Advertisement
vojtarek

Untitled

Jun 16th, 2011
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.50 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Set these paths appropriately
  4.  
  5. BIN=/mnt/minerva1/nlp/software/TreeTagger/bin
  6. CMD=/mnt/minerva1/nlp/software/TreeTagger/cmd
  7. LIB=/mnt/minerva1/nlp/software/TreeTagger/lib
  8.  
  9. OPTIONS="-token -lemma -sgml -pt-with-lemma"
  10.  
  11. TOKENIZER=${CMD}/tokenize.pl
  12. TAGGER=${BIN}/tree-tagger
  13. ABBR_LIST=${LIB}/english-abbreviations
  14. PARFILE=${LIB}/english.par
  15. LEXFILE=${LIB}/english-lexicon.txt
  16.  
  17. $TOKENIZER -e -a $ABBR_LIST $* |
  18. # remove empty lines
  19. grep -v '^$' |
  20. # external lexicon lookup
  21. perl $CMD/lookup.perl $LEXFILE |
  22. # tagging
  23. $TAGGER $OPTIONS $PARFILE
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. #!/bin/sh
  38.  
  39. # In order to activate external lexicon lookup
  40. # you have to uncomment the respective line below
  41. # i.e. remove the hash symbol in front of it.
  42. # The external lexicon must be stored in a file named
  43. # "german-lexicon.txt" in the subdirectory "lib".
  44. # See the Perl script "lookup.perl" for more information
  45. # on the format of this file.
  46.  
  47. # Set these paths appropriately
  48.  
  49. BIN=/mnt/minerva1/nlp/software/TreeTagger/bin
  50. CMD=/mnt/minerva1/nlp/software/TreeTagger/cmd
  51. LIB=/mnt/minerva1/nlp/software/TreeTagger/lib
  52.  
  53. OPTIONS="-token -lemma -sgml -pt-with-lemma"
  54.  
  55. TOKENIZER=${CMD}/tokenize.pl
  56. TAGGER=${BIN}/tree-tagger
  57. ABBR_LIST=${LIB}/german-abbreviations
  58. PARFILE=${LIB}/german.par
  59. LEXFILE=${LIB}/german-lexicon.txt
  60. FILTER=${CMD}/filter-german-tags
  61.  
  62. $TOKENIZER -a $ABBR_LIST $* |
  63. # external lexicon lookup
  64. perl $CMD/lookup.perl $LEXFILE |
  65. # tagging
  66. $TAGGER $OPTIONS $PARFILE  |
  67. # error correction
  68. $FILTER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement