Stanford parser java error

后端 未结 3 1331
北海茫月
北海茫月 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:45

    Yes, You do not have CoreNLP models Jar. Either you can download them from here- http://nlp.stanford.edu/software/corenlp.shtml#Download

    or, you can do this:

    1. Create a Maven project. ( It is easy in eclipse)
    2. In the pom.xml file, add this dependency.

       
        edu.stanford.nlp
        stanford-corenlp
        3.5.0
      
      
        edu.stanford.nlp
        stanford-corenlp
        3.5.0
        models
      
      
    3. Do maven clean, maven update and maven install. The model files will be installed in your .m2 folder automatically.

    I hope you know maven. If not, please post a comment / question. We will answer.

提交回复
热议问题