Skip to content
Discussion options

You must be logged in to vote

The my tag is expected, mine is the actual bug.

For my, PRON PRP$ poss is by design. spaCy's English models use the Penn Treebank tag set, where PRP$ is a possessive pronoun, and the coarse pos_ maps that to PRON. The "determiner/adjective" side you're looking for isn't thrown away, it's just stored somewhere other than pos_. Look at the dependency and the morph:

import spacy
nlp = spacy.load("en_core_web_lg")
t = nlp("my house is mine")[0]
print(t.dep_)    # poss   -> it's modifying "house" as a possessive
print(t.morph)   # Poss=Yes|PronType=Prs

So if what you care about is "is this word acting as a possessive determiner on a noun", check token.dep_ == "poss" and token.morph.get("Poss"),…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Polirecyliente
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants