chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.21k stars 249 forks source link

Invalid subject verb object tuple in case of a composite subject #251

Closed zeeshanalipanhwar closed 3 years ago

zeeshanalipanhwar commented 5 years ago

steps to reproduce

doc = nlp("Aslam and Yahya are good friends.") for svo in textacy.extract.subject_verb_object_triples(doc): ... print (svo) ... (Aslam, are, friends) (Yahya, are, friends)

expected vs. actual behavior

possible solution?

context

environment

bdewilde commented 5 years ago

Hi @ZeeshanA1i , this function is pretty basic, and as you can see, doesn't work in all cases. I would love to see somebody improve it and submit a PR.

bdewilde commented 3 years ago

Very belated update: SVO triple extraction has been updated, and is now available in the v0.11 release: https://github.com/chartbeat-labs/textacy/releases/tag/0.11.0