2

Spacy's site said they use universal dependencies scheme in their annotations specifications page. But when I parse "I love you", '''you''' was made a "dobj" of "love". There's no "dobj" in the universal dependency relations doc. So I have two questions :

  1. How to get spacy to use the universal dependency relations?
  2. How to get the doc for the relations spacy uses?

enter image description here

Anwarvic
  • 12,156
  • 4
  • 49
  • 69

2 Answers2

3

Spacy's provided models don't use UD dependencies for English or German. From the docs, where you can find tables for the dependency labels (https://spacy.io/api/annotation#dependency-parsing):

The individual labels are language-specific and depend on the training corpus.

For most other models / languages, UD dependencies are used.

aab
  • 10,858
  • 22
  • 38
  • Are there examples showing how an individual dependency is linked, like the way UD explains their dependencies? – IKnowHowBitcoinWorks Nov 22 '19 at 00:46
  • Here is the technical report about the ClearNLP dependency conversion for English: https://www.mathcs.emory.edu/~choi/doc/cu-2012-choi.pdf – aab Nov 22 '19 at 12:16
1

How to get spacy to use the universal dependency relations?

According to the spaCy official documentation, all spaCy models are trained using the Universal Dependency Corpora which is language-specific. According to English, you can see the full list of labels from this link where you can find dojb listed as direct object.

How to get the doc for the relations spacy uses?

I don't know what you mean by doc. If you mean documentation, I already provided the official documentation when answering the first question. Also, you can use spacy.explain() to get faster results like so:

>>> import spacy
>>>
>>> spacy.explain('dobj')
direct object
>>>
>>> spcay.explain('nsubj')
nominal subject

Hope this answers your question!

Anwarvic
  • 12,156
  • 4
  • 49
  • 69
  • I found this on ClearNLP too. I was hoping to get some examples like what UD provides. Sometimes I don't know what they mean in even if they have the explain. – IKnowHowBitcoinWorks Nov 22 '19 at 00:44