Reputation: 349
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 :
Upvotes: 2
Views: 1964
Reputation: 412
It turns out, dobj
is one of the universal dependency relations. It's just been changed in the latest revision.
From the official UDR website:
It is a revised version of the relations originally described in Universal Stanford Dependencies: A cross-linguistic typology (de Marneffe et al. 2014).
In the paper cited above, you can see multiple references to dobj
, despite its absence from the table on the UDR website.
Upvotes: 0
Reputation: 11474
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.
Upvotes: 3
Reputation: 12992
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!
Upvotes: 1