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 = next(result)
list(dep.triples())
Как выполнить анализ зависимостей в NLTK?