It parses "fruit flies like a banana" the same way as "Time flies like an arrow". https://en.wikipedia.org/wiki/Time_flies_like_an_arrow;_frui...
Dependency parse tree visualization
11–20 of 28 posts
Re: Dependency parse tree visualization
#12Super interesting! I'm feeding it Shakespeare, just for fun, however I'm having trouble understanding the meaning of having two CCMP in the context of the verb make in this "Our doubts are traitors, and make us lose the good we oft might win, by fearing to attempt"[1] [1] http://spacy.io/displacy/?full=Our%20doubts%20are%20traitors...
In linguistic terms this is a case of "over-generation": the parser has proposed an interpretation that's not "licensed" by the language in general. (In contrast, consider a sentence like "I shot an elephant in my trousers." A reading like "An elephant in my trousers was shot" is licensed but unlikely.)
To see the point of error, step through the parser until the focus is on "win", with 4 words on the stack. (Deep linking into particular states will come in a future version. For now, just press forward...).
At that state, the parser should attach "we might win" to "good", as a reduced relative clause. Instead it opts to pop "good" from the stack. It then ends up in a bad situation, and essentially attaches to "make" as a way to concede defeat on the arc, and get on with the rest of the sentence.
The parser actually could generate any projective tree over its input. It's only constrained by its statistics. On the benchmark evaluations this tends to perform better. I'm interested in trying out ways to incorporate syntactic restrictions, particularly for verb valencies, into the parser.
Re: Dependency parse tree visualization
#13It parses "fruit flies like a banana" the same way as "Time flies like an arrow". https://en.wikipedia.org/wiki/Time_flies_like_an_arrow;_frui...
Some sentences are just totally ambiguous without context. "Fruit flies like a banana." isn't even good English. Is the sentence trying to say "Some particular fruit flies like a particular banana"? Or "All fruit flies like any banana"?
By the way, Spacy creator - how's the NER coming along?
Re: Dependency parse tree visualization
#14Nice, and has a built-in parser and annotation system too. Very nice. See also: http://brat.nlplab.org/examples.html Any others like this?
Re: Dependency parse tree visualization
#15Re: Dependency parse tree visualization
#16It parses "fruit flies like a banana" the same way as "Time flies like an arrow". https://en.wikipedia.org/wiki/Time_flies_like_an_arrow;_frui...
Re: Dependency parse tree visualization
#17Huh. I work for a book company and feel we could do some interesting things with a parser like this...
Re: Dependency parse tree visualization
#18Interesting and quite neat! I tried this with the famous openings of two famous novels, "Pride and Prejudice" and "Ulysses"; it did well with the former but struggled a bit with the latter. I guess that's probably par for the course for most humans with those two texts, though.
I think it depends on the level of complexity, and common structure of the sentences. If a writer uses a bit more prosaic language it will fail. I tried the famous opening from the "Commentarii de Bello Gallico". "All Gaul is divided into three parts, one of which the Belgae inhabit, the Aquitani another, those who in their own language are called Celts, the third." It failed to parse the tree in a correct way. On th…
Re: Dependency parse tree visualization
#19It parses "fruit flies like a banana" the same way as "Time flies like an arrow". https://en.wikipedia.org/wiki/Time_flies_like_an_arrow;_frui...
That's a good example as to why this tool should probably have the option to output a sample of the top-N guesses. Some sentences are just totally ambiguous without context. "Fruit flies like a banana." isn't even good English. Is the sentence trying to say "Some particular fruit flies like a particular banana"? Or "All fruit flies like any banana"? By the way, Spacy creator - how's the NER coming along?
It is possible to do incremental dependency parsing with a beam, but all the copying of beam "states" is expensive and there are no guarantees that the n complete parses in the beam are really the n best parses w.r.t. the model.
Re: Dependency parse tree visualization
#20Huh. I work for a book company and feel we could do some interesting things with a parser like this...
matt@spacy.io