简体   繁体   English

如何将斯坦福大学NLP“安装”到Java中

[英]How to “install” Stanford NLP into Java

I am still relatively new to to Java, so the simpler the explanation the better. 我对Java还是比较陌生,因此解释越简单越好。

I need to use the Stanford Natural Language Parser ( http://nlp.stanford.edu/ ) in one of my programs. 我需要在其中一个程序中使用Stanford Natural Language Parser( http://nlp.stanford.edu/ )。 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. 我知道下载的zip包含演示文件,但是它们并不能真正帮助我。

Currently, the two problems I face are: 1. How to import the packages. 当前,我面临的两个问题是:1.如何导入软件包。 I am not sure how to import packages such as edu.stanford.nlp.process.Tokenizer to my program. 我不确定如何将诸如edu.stanford.nlp.process.Tokenizer之类的包导入到我的程序中。 I think it may have something to do with classpath, but I'm not sure how to set it up. 我认为这可能与classpath有关,但是我不确定如何设置它。 2. How to use the Stanford NLP in the program. 2.如何在程序中使用Stanford NLP。 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. 它根本不是关于NLP或斯坦福解析器的,您需要学习Java的工作方式。 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. 提示:库是一个jar文件,您需要将其放在某个地方并添加到项目的类路径中,以便Java在搜索类时开始对其进行查找。 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). 根据您的开发环境,这可以是命令行选项(“ cp”或“ classpath”),也可以是集成开发环境中的项目设置(Eclipse,IDEA或您使用的任何东西)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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