intro-spacy-nlp icon indicating copy to clipboard operation
intro-spacy-nlp copied to clipboard

SVO do not pass all unittests

Open sevaader opened this issue 8 years ago • 1 comments

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')]

sevaader avatar Jun 02 '16 13:06 sevaader

Same question.

Harryhaha avatar Apr 12 '17 08:04 Harryhaha