2015-10-19 88 views

回答

1

這裏有一個例子命令應該工作:

java -Xmx3g -cp "*:." edu.stanford.nlp.parser.lexparser.LexicalizedParser -maxLength 50 -tLPP edu.stanford.nlp.parser.lexparser.ArabicTreebankParserParams -encoding UTF-8 -arabicFactored -tokenized -writeOutputFiles -outputFilesExtension out -outputFormat "penn" -loadFromSerializedFile edu/stanford/nlp/models/lexparser/arabicFactored.ser.gz sample_arabic_sentence.txt 

你需要確保你有解析器車型的jar:

斯坦福解析器-3.5.2-models.jar

這是可通過Maven的或與分析器分佈:

http://nlp.stanford.edu/software/lex-parser.shtml