简体   繁体   中英

How to “install” Stanford NLP into Java

I am still relatively new to to Java, so the simpler the explanation the better.

I need to use the Stanford Natural Language Parser ( http://nlp.stanford.edu/ ) in one of my programs. However, I found not really found any clear/easy to understand instructions on how to actually "install" it. I know that the downloaded zip contains demo files, but they have not really been able to help me much.

Currently, the two problems I face are: 1. How to import the packages. I am not sure how to import packages such as edu.stanford.nlp.process.Tokenizer to my program. I think it may have something to do with classpath, but I'm not sure how to set it up. 2. How to use the Stanford NLP in the program. I just need to know exactly how to use it.

Thanks for taking time to read my question. I know that answering this question may take some work, but I really need the help. Thanks again.

Systemcode, I'm afraid your question is mislabeled. It is not about NLP or Stanford parser at all, you need to learn how Java works. Hint: library is a jar file that you need to put somewhere and add to your project's classpath, for Java to start looking into it when searching for classes. Depending on your development environment this is either command line option ("cp" or "classpath") or project settings in your Integrated Development Environment (Eclipse, or IDEA, or whatever you are using).

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