Closed fatihbozdag closed 4 years ago
strange... please try installing it like so - I've just checked it with the spacy 2.2.5 models;
I ran it like so:
git clone https://github.com/peter3125/enhanced-subject-verb-object-extraction.git cd enhanced-subject-verb-object-extraction sudo pip3 install spacy sudo python3 -m spacy download en_core_web_sm python3 demo.py
now I got the error;
You can now load the model via spacy.load('en_core_web_sm')
fatihunalbozdag@Fatihs-iMac ~ % python3 /Users/fatihunalbozdag/Desktop/enhanced-subject-verb-object-extraction-master/demo.py
Traceback (most recent call last):
File "/Users/fatihunalbozdag/Desktop/enhanced-subject-verb-object-extraction-master/demo.py", line 1, in
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3: can't find 'main' module in '/Users/fatihunalbozdag/Desktop/enhanced-subject-verb-object-extraction-master'
fatihunalbozdag@Fatihs-iMac ~ %
Strange thou, I cannot trace the error no matter what.
strange indeed - make sure you run it inside its directory - don't add all the paths - because Python can't just look for files without writing explicit code to do so.
So in your case; make sure you change into the directory before running it
cd /Users/fatihunalbozdag/Desktop/enhanced-subject-verb-object-extraction-master/
and then
python3 demo.py
now it's working. Rather than OS X terminal I used IDLE Python Shell, seems like working.
Meanwhile is it possible to extend the scope of query? For instance, I'm working on dative alternation, thus I need to extract object after dative, like "He gave me an apple vs He gave an apple to me". I guess script only extracts triples? SVO? How about S,V, dative(prep) + Object? or S V Dobj + Obj.
No idea - I haven't worked on this project for two years. Give it a try if you like. I'll merge it in.
Greetings,
When I try to execute the code on python shell, I got the error
"Traceback (most recent call last): File "", line 1, in
File "", line 10, in findSVOs
TypeError: cannot unpack non-iterable NoneType object"
Can you help me about it?
Regards.