path_to_model = (
    """C:/Program Files/stanford-postagger-2012-05-22/models/english-bidirectional-distsim.tagger"""
    )
path_to_jar = (
    'C:/Program Files/stanford-postagger-2012-05-22/stanford-postagger.jar')
tagger = nltk.tag.stanford.POSTagger(path_to_model, path_to_jar)
tokens = nltk.tokenize.word_tokenize('I hope this works!')
print(tagger.tag(tokens))
NLTK не может найти исполняемый файл Java