Setting NLTK with Stanford NLP (both StanfordNERTagger and StanfordPOSTagger) for Spanish

后端 未结 3 2229
天涯浪人
天涯浪人 2021-02-09 07:54

The NLTK documentation is rather poor in this integration. The steps I followed were:

  • Download http://nlp.stanford.edu/software/stanford-postagger-

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-09 08:11

    The error lies in the arguments written for the StanfordNerTagger function.

    The first argument should be a model file or the classifier you are using. You can find that file inside the Stanford zip file. For example:

        st = StanfordNERTagger('/home/me/stanford/stanford-postagger-full-2015-04-20/classifier/tagger.ser.gz', '/home/me/stanford/stanford-spanish-corenlp-2015-01-08-models.jar')
    

提交回复
热议问题