"subject_object_extraction" 在使用 spaCy 时犯了一个错误?

One mistake with "subject_object_extraction" for working with spaCy?

我在 ubuntu 中使用 python3 和 python shell。我的代码:

import spacy
from subject_object_extraction import findSVOs

# can still work even without punctuation
parse = parser("he and his brother shot me and my sister")
print(findSVOs(parse))

# very complex sample. Only some are correct. Some are missed.
parse = parser("... any text ... ")
print(findSVOs(parse))

结果,我犯了下一个错误:

Traceback (most recent call last):
File "/home/vv/PythProj/sp_ex_2.py", line 2, in <module>
from subject_object_extraction import findSVOs
ImportError: No module named 'subject_object_extraction'

我的错误在哪里?谢谢

The module subject_object_extraction isn't a part of the spaCy package, it's written by Schrading himself, and can be found here: https://github.com/NSchrading/intro-spacy-nlp/blob/master/subject_object_extraction.py

来自https://github.com/explosion/spaCy/issues/493