Gold POS in Stanford parser

79 views Asked by At

I’m using the Stanford parser (edu.stanford.nlp.parser.lexparser.LexicalizedParser) without gold POS-tag and in Penn style, it’s working correctly.

My test file is:

(ROOT (S (NP (NNS People)) (VP (MD can) (VP (VB butter) (NP (PRP$ their) (NN bread)) (PP (IN with) (NP (DT a) (NN knife))))) (. .)))

But when I want to use the gold POS for my test set using the -tagSeparator the train model built successfully but the test phase finished with parsing 0 sentences (without error and Ignore the test sentences).

My test file is:

People/NNS can/MD butter/VB their/PRP$ bread/NN with/IN a/DT knife/NN ./.

I read this and used this command to parse my test sentences:

java -mx1500m -cp "*" edu.stanford.nlp.parser.lexparser.LexicalizedParser -sentences newline -tokenized -tagSeparator / -tokenizerFactory edu.stanford.nlp.process.WhitespaceTokenizer -tokenizerMethod newCoreLabelTokenizerFactory -headFinder edu.stanford.nlp.trees.LeftHeadFinder -train trainpath -testTreebank testpath

Is there a separate command for this purpose (force the parser to use those tags)?

Thanks

0

There are 0 answers