nlp - Why there is a difference in parse tree output generated from api and GUI provided in stanfordNLP -


i using 'stanford-corenlp-full-2013-06-20' api generate parse tree given below

private string text= "heart attack causes reduced lifespan average"; annotation annotation = new annotation(text); corenlp.annotate(annotation); list<coremap> sentences = annotation.get(sentencesannotation.class); (coremap sentence : sentences) {     tree tree = sentence.get(treeannotation.class);     tree.pennprint(); } 

it showing sub sentence 's' shown below

(root (**s** (np (nnp heart) (nn attack))              (vp (vbz causes)                  (**s** (np (vbn reduced) (nn lifespan) (nn average)))))) 

but when try parse same sentence using gui provided 'stanford-parser-full-2013-06-20' giving different tree (it seems right one) given below

(root (**s** (np (nnp heart) (nn attack))              (vp (vbz causes)                  (vp (vbn reduced) (np (nn lifespan) (nn average)))))) 

can 1 point out why both showing 2 different outputs though both belong same version.

the stanford parser output different results depending on number of annotation tasks asking (source). required parser output sentence split, tokenization, , parse tasks. however, if run sentence spilt, tokenization, part-of-speech tag, , parse tasks different results.

so corenlp annotation going add pos tagging default, giving different parse results parse task.

in experience working parse trees , both forms of output neither method strictly better.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -