Stanford parser java error

后端 未结 3 1300
北海茫月
北海茫月 2021-01-12 21:27

I am working on a research about NLP, i woul to use Stanford parser to extract noun phrases from text, the parser version i used is 3.4.1 this is the sample code i used

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-12 21:43

    As others have pointed out you have to include the jar files that come along with the CORE-NLP package that is avalaible at the stanford parser page.

    More specifically add these to your class path : stanford-parser-3.4.1-models.jar,stanford-parser-3.4.1-sources.jar,stanford-parser.jar ( these are specific to the version of stanford parser you are using i.e version 3.4.1 )

    You can add it to the class path as follows :

    For Linux : export CLASSPATH=$CLASSPATH:/some_path/stanford-parser-3.4.1-sources.jar:/some_path/stanford-parser-3.4.1-models.jar:/some_path/stanford-parser.jar

    For Windows : set CLASSPATH=%CLASSPATH%;\some_path\stanford-parser-3.4.1-models.jar;\some_path\stanford-parser-3.4.1-sources.jar;\some_path\stanford-parser;

提交回复
热议问题