對應的目錄
http://code.google.com/p/berkeleyparser/downloads/list
把這些檔案抓下來,放在同一個工作目錄中,以要分析的檔案名叫mumbai.txt為例,鍵入
java -Xms64m -Xmx512m -jar berkeleyParser.jar -gr eng_sm6.gr.gz -inputFile mumbai.txt
它的說明檔範例中沒有參數-Xms64m -Xmx512m,對於使用者來說可能會得到空間不夠的錯誤訊息;其它可用參數如下
-render Write rendered tree to image file. (Default: false)
-inputFile Read input from this file instead of reading it from STDIN.
-substates Output subcategories (only for binarized viterbi trees). (Default: false)
-gr Grammarfile (Required) [required]
-binarize Output binarized trees. (Default: false)
-likelihood Output sentence likelihood, i.e. summing out all parse trees: P(w) (Default: false)
-confidence Output confidence measure, i.e. tree likelihood: P(T|w) (Default: false)
-tokenize Tokenize input first. (Default: false=text is already tokenized)
-scores Output inside scores (only for binarized viterbi trees). (Default: false)
-viterbi Compute viterbi derivation instead of max-rule tree (Default: max-rule)
-chinese Enable some Chinese specific features in the lexicon.
-accurate Set thresholds for accuracy. (Default: set thresholds for efficiency)
2010年12月3日 星期五
訂閱:
張貼留言 (Atom)
喔
回覆刪除太感謝你的資訊了
不然我怎樣都不知道參數怎麼設
謝謝你!