Advertisement
vojtarek

tree tagger english

Jun 16th, 2011
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1.  
  2. #!/bin/sh
  3.  
  4. # Set these paths appropriately
  5.  
  6. BIN=/mnt/minerva1/nlp/software/TreeTagger/bin
  7. CMD=/mnt/minerva1/nlp/software/TreeTagger/cmd
  8. LIB=/mnt/minerva1/nlp/software/TreeTagger/lib
  9.  
  10. OPTIONS="-token -lemma -sgml -pt-with-lemma"
  11.  
  12. TOKENIZER=${CMD}/tokenize.pl
  13. TAGGER=${BIN}/tree-tagger
  14. ABBR_LIST=${LIB}/english-abbreviations
  15. PARFILE=${LIB}/english.par
  16. LEXFILE=${LIB}/english-lexicon.txt
  17.  
  18. $TOKENIZER -e -a $ABBR_LIST $* |
  19. # remove empty lines
  20. grep -v '^$' |
  21. # external lexicon lookup
  22. perl $CMD/lookup.perl $LEXFILE |
  23. # tagging
  24. $TAGGER $OPTIONS $PARFILE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement