Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use SyntaxNet parser/tagger with spaCy API?

I have been using spaCy Python package to parse and tag text and using the resulting dependency tree and other attributes to derive meaning. Now I would like to use SyntaxNet's Parsey McParseface for parsing and dependency tagging (which seems better), but I would like to keep using spaCy API because it is so easy to use and it does many things that Parsey doesn't. SyntaxNet outputs POS tags and dependency tags/tree in a CoNLL-format:

  1. Bob _ NOUN NNP _ 2 nsubj _ _
  2. brought _ VERB VBD _ 0 ROOT _ _
  3. the _ DET DT _ 4 det _ _
  4. pizza _ NOUN NN _ 2 dobj _ _
  5. to _ ADP IN _ 2 prep _ _
  6. Alice _ NOUN NNP _ 5 pobj _ _
  7. . _ . . _ 2 punct _ _

and spaCy seems to be able to read CoNLL format right here. But I can't figure out where in spaCy's API does it take a CoNLL-fromatted string.

like image 656
Jason Avatar asked Jun 21 '16 00:06

Jason


1 Answers

From the spaCy blog:

Obviously, we want to build a bridge between Parsey McParseface and spaCy, so that you can use the more accurate model with the sweeter spaCy API.

However, it looks like there still plenty of work to be done before this is possible.

See also the spaCy author's response here.

like image 90
simon Avatar answered Sep 21 '22 19:09

simon