简体   繁体   中英

How to use stanford nlp library in java?

Does anyone know how to use a stanford nlp library for lemmatization. It is giving a maven framework style. However, I only just wanted to use in normal library. I have imported the nlp libraries. However, it is giving me a ClassNotFoundException.

java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

Any idea on what minimum libraries are required to add for this lemmatizer?

Just create java project using Maven. And add following dependency:

For SBT: "edu.stanford.nlp" % "stanford-corenlp" % "3.6.0", "edu.stanford.nlp" % "stanford-corenlp" % "3.6.0" classifier "models", "edu.stanford.nlp" % "stanford-parser" % "3.6.0"

Note: In your case use Maven. Above 3 dependency enough for core NLP.
But for your Exception use : Maven org.slf4j dependency or include org.slf4j jar in your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM