I am new to dependecy parsing and maybe this error might be very easy to fix. I am trying to perform dependency parsing on statements in order to find out the focus of specific words. I found following links:
How do I do dependency parsing in NLTK?
If I try the above link then I am getting,
LookupError:
===========================================================================
NLTK was unable to find the java file!
Use software specific configuration paramaters or set the JAVAHOME environment variable.
===========================================================================
The second link I tried was:
https://github.com/Lynten/stanford-corenlp
Following is my implementation:
from pycorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('http://localhost:9000')
sentence='I shot an elephant in my sleep'
print 'Dependency Parsing:', nlp.dependency_parse(sentence)
nlp.close()
But I am getting AttributeError: StanfordCoreNLP instance has no attribute 'dependency_parse'
If there are other methods which are easier, then also I am open to them. Thank you.