frcchang / zpar

ZPar statistical parser. Universal language support (depending on the availability of training data), with language-specific features for Chinese and English. Currently support word segmentation, POS tagging, dependency and phrase-structure parsing.
http://faculty.sutd.edu.sg/~yue_zhang/doc/index.html
134 stars 33 forks source link

The size of the sentence is larger than the system configuration. #19

Open liesun1994 opened 6 years ago

liesun1994 commented 6 years ago

hello , I am using zpar recently . Command is as follows : /dist/zpar.en -od ./model/english-models en.txt en.txt.dep How to set max sentence length in zpar ?

Laurelvav commented 5 years ago

Hi, I was checking the same problem. Language specific taggers at zpar/dist/chinese.postagger zpar/dist/english.postagger etc. seems to have the option to choose it. At least it's parameter mentioned in help: Usage: ./tagger feature_file [input_file [output_file]] Options: -mM: maximum sentence size. Default: 512; -nN: N best list output. Default: 1; -s: output scores. Default: unset;

But program ignores the value if it's set. So only option left seems to change hardcoded value at: zpar.cpp:#define MAX_SENTENCE_SIZE 512 And compile again. Or fix the bug completely :).