spaCy icon indicating copy to clipboard operation
spaCy copied to clipboard

PROPN (such as John) as the first word of a sentence, with another PROPN in the sentence, does not have an entity type

Open AndreaWesterinen opened this issue 3 years ago • 0 comments

How to reproduce the behaviour

sent1 = "John gave Susan a raise." sent2 = "John helped Susan to raise money." sent3 = "John raised money."

Processing: nlp_sentence = nlp(sent#) for token in nlp_sentence: print(token.morph, token.dep_, token.pos_, token.lemma_, token.ent_type_)

Results for John and Susan: sent1 => Number=Sing nsubj PROPN John Number=Sing dative PROPN Susan PERSON sent2 => Number=Sing nsubj PROPN John Number=Sing dobj PROPN Susan PERSON sent3 => Number=Sing nsubj PROPN John PERSON

Your Environment

  • Operating System: MacOS Monterey 12.6
  • Python Version Used: 3.8
  • spaCy Version Used: 3.4.1
  • Environment Information: Transformer model ('en_core_web_trf')

AndreaWesterinen avatar Sep 19 '22 20:09 AndreaWesterinen