When I am using the example from here I am getting the error
AttributeError: 'Tree' object has no attribute 'triples'
The version of the nltk I am using is 3.2.4, python 2.7. Any ideas of how to solve it are highly appreciated!
from nltk.parse.stanford import StanfordDependencyParser
path_to_jar = 'path_to/stanford-parser-full-2014-08-27/stanford-parser.jar'
path_to_models_jar = 'path_to/stanford-parser-full-2014-08-27/stanford-parser-3.4.1-models.jar'
dependency_parser = StanfordDependencyParser(path_to_jar=path_to_jar, path_to_models_jar=path_to_models_jar)
result = dependency_parser.raw_parse('I shot an elephant in my sleep')
dep = result.next()
print list(dep.triples())