Live data from Hacker News

Dependency parse tree visualization

spacy.io

21–28 of 28 posts

Re: Dependency parse tree visualization

#21
post #13

Earlier quoted context omitted.

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?

Spacy's implementation, assuming it's roughly equivalent with the one syllog1sm blogged about, just does a greedy incremental parse so it only produces one candidate parse. 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.

In that case, I wonder if it can output a probability score for each tag at each position, like pycrfsuite does? Then the output could be ensembled with other taggers, or otherwise pass that confidence information downstream.

Also, maybe a dumb question - is there any library or best-practice method for the ensembling of taggers / chunkers? Or must I create it myself from scratch?

Re: Dependency parse tree visualization

#22
I tried "I am tired of being in front of my computer" and it treats "front" like a noun, and the tree is not quite right (the dependencies shown are like: I -> am -> tired -> of -> being -> in -> front -> of -> my computer, instead I think of something like: I -> am -> tired -> of -> (being -> in front of -> my computer)).

The UI is quite nice though.

Re: Dependency parse tree visualization

#23
post #14
post #4

Nice, and has a built-in parser and annotation system too. Very nice. See also: http://brat.nlplab.org/examples.html Any others like this?

Full disclosure, brat author. We were inspired by things like "What's Wrong With My NLP?" [1] and TikZ-dependency [2]. But, truth be told, there is not all that many great visualisation tools out there for NLP data. The same goes for good and freely available NLP toolkits, things like SpaCy is very much an exception rather than the rule. [1]: https://code.google.com/p/whatswrong/ [2]: http://sourceforge.net/projects/…

Brat is awesome! I just started using it last week for a project. For people who don't know what Brat is, there is a nice demo here using Brat to visualize the output of Stanford CoreNLP:

http://nlp.stanford.edu:8080/corenlp/

Re: Dependency parse tree visualization

#26
post #16
post #9

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...

Similarly, it seems to fail on "The old man the boat", marking "man" as a noun. The meaning of the sentence however, in this case, is fairly unambiguous, but parsing it can be tricky. See other: https://en.wikiped.org/wiki/Garden_path_sentence

In some sense, it's a mark of success for an AI system to fail in the same way that humans do. "The old man the boat" is a terrible sentence, essentially ungrammatical.

Re: Dependency parse tree visualization

#27
post #16

Earlier quoted context omitted.

Similarly, it seems to fail on "The old man the boat", marking "man" as a noun. The meaning of the sentence however, in this case, is fairly unambiguous, but parsing it can be tricky. See other: https://en.wikiped.org/wiki/Garden_path_sentence

In some sense, it's a mark of success for an AI system to fail in the same way that humans do. "The old man the boat" is a terrible sentence, essentially ungrammatical.

Can a sentence be terrible? In what way is it ungrammatical?

Re: Dependency parse tree visualization

#28
post #13

Earlier quoted context omitted.

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?

Spacy's implementation, assuming it's roughly equivalent with the one syllog1sm blogged about, just does a greedy incremental parse so it only produces one candidate parse. 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.

Yes, I do greedy parsing. There are many advantages to this, which I'll write about before too long. Fundamentally, it's "the way forward". As models improve in accuracy, search matters less and less.

By the way, the beam isn't slow from the copying. That's really not so important. What matters is simply that you're evaluating, say, 8 times as many decisions. This makes the parser 6-7x slower (you can do a little bit of memoisation).

Post reply on HN