intro-spacy-nlp
intro-spacy-nlp copied to clipboard
SVO do not pass all unittests
The sample code( intro-spacy-nlp/subject_object_extraction.py ) do not pass all unittests with the following config.
Python 3.5.1 |Continuum Analytics, Inc. [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux nltk 3.2.1 spacy 0.101.0
print("--------------------------------------------------")
tok = nlp("he is an evil man that hurt my child and sister")
svos = SOE_factory('en').findSVOs(tok)
printDeps(tok)
print(svos)
assert set(svos) == {('he', 'hurt', 'child'), ('he', 'hurt', 'sister'), ('man', 'hurt', 'child'), ('man', 'hurt', 'sister')}
The current answer is [('he', 'is', 'man'), ('that', 'hurt', 'child'), ('that', 'hurt', 'sister')]
Same question.