cogcomp-nlp
cogcomp-nlp copied to clipboard
Error in parsing Stanford outputs
For dependency parse of the sentence:
Comedian-actress Roseanne Barr sang her famous shrieking rendition of the "Star Spangled Banner" before a San Diego Padres Cincinnati Reds game.
Our demo shows the following parse.
But on running the same version (3.8.0) locally, I get
root(ROOT-0, sang-4)
amod(Barr-3, Comedian-actress-1)
nn(Barr-3, Roseanne-2)
nsubj(sang-4, Barr-3)
poss(rendition-8, her-5)
amod(rendition-8, famous-6)
amod(rendition-8, shrieking-7)
dobj(sang-4, rendition-8)
prep(rendition-8, of-9)
det(Banner-14, the-10)
punct(Banner-14, ``-11)
nn(Banner-14, Star-12)
amod(Banner-14, Spangled-13)
pobj(of-9, Banner-14)
punct(Banner-14, ''-15)
prep(sang-4, before-16)
det(game-23, a-17)
nn(game-23, San-18)
nn(game-23, Diego-19)
nn(game-23, Padres-20)
nn(game-23, Cincinnati-21)
nn(game-23, Reds-22)
pobj(before-16, game-23)
punct(sang-4, .-24)
There are differences in this, for example in our output an edge is pobj(of-9 to game-23) where is the Stanford output it is pobj(of-9, Banner-14) (which is the correct parse as well).
Another example,
The CEO, John Smith wanted to fire Larry Page.
![screen shot 2018-03-05 at 2 56 44 pm](https://user-images.githubusercontent.com/6223213/36996727-7d6a679e-2085-11e8-807d-b4b54e4bedcb.png)
But the actual output contains an appos(CEO-2, Smith-5) edge
root(ROOT-0, wanted-6)
det(CEO-2, The-1)
nsubj(wanted-6, CEO-2)
punct(CEO-2, ,-3)
nn(Smith-5, John-4)
appos(CEO-2, Smith-5)
aux(fire-8, to-7)
xcomp(wanted-6, fire-8)
nn(Page-10, Larry-9)
dobj(fire-8, Page-10)
punct(wanted-6, .-11)
If the move to new depparse is only inhibited by the new label space of Universal Dependencies, the old Stanford dependencies can still be used by using this model:
props.setProperty("depparse.model", "edu/stanford/nlp/models/parser/nndep/english_SD.gz");
@HornHehhf does this relate to changes you made in SRL? @Cathyhu93 you should take a look at this at some point and determine whether or not changing this would affect SRL.
@nitishgupta just clarifying to allow us to reproduce this behavior: when you say "running the same version locally", do you mean, you run the pipeline with the stanford dep parse active, and see the output you give above from that annotator?
I think the online demo used stanford_3.3.1 default for DEPENDENDY_STANFORD view. Could that be the reason why the results are different from 3.8.0? @mssammon @nitishgupta