I can get the output of tags and words for the sentence, for example: "My name is Rahul." as
My / PRP $, name / NN, is / VBZ, Rahul / NNP,. /.]
with the program:
LexicalizedParser lp = LexicalizedParser.loadModel( "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz" ); lp.setOptionFlags(new String[]{"-maxLength", "80", "-retainTmpSubcategories"}); String sent = "My name is Rahul"; Tree parse = (Tree) lp.apply(sent); List taggedWords = parse.taggedYield(); System.out.println(taggedWords);
But I also need to get a parsing batch of the offer. Is there any modification I can do with my program to get parsing?
Thanks.
source share