如何在Mac的航站楼与Java的Stanford Core NLP进行负面否决?
我不熟悉Java(只有Python)。但是我想运行 negait。
我已经安装了Stanford Core nlp 3.7&下载了 negait存储库。他们俩都在我的主目录中。我还将JDK SE 1.8设置为我的家中。
当我在Negait-Master文件夹中的MacBook终端上运行命令时:
java -cp negate.jar:/Users/username/NegAIT-master/stanford-corenlp-3.7.0/stanford-corenlp-3.7.0.jar:/Users/username/NegAIT-master/stanford-corenlp-3.7.0/stanford-corenlp-3.7.0-models.jar negate.NegationParser AagenaesSyndrome.txt AagenaesSyndromeNegation
我会收到以下错误:
Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/pipeline/StanfordCoreNLP
at negate.TextRead.<init>(TextRead.java:48)
at negate.NegationParser.main(NegationParser.java:21)
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.pipeline.StanfordCoreNLP
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
正如我所说,我对Python很熟悉,但对Java不熟悉,如果有人可以帮助我或给我一些有关如何如何处理的提示。运行此工具,我将非常感谢它。
I am not familiar with Java (only python). But I'd like to run NegAIT.
I have stanford core nlp 3.7 installed & downloaded the NegAIT repository. They're both in my home directory. I also have JDK SE 1.8 set as my home path.
When I ran the command on my Macbook terminal inside the NegAIT-master folder:
java -cp negate.jar:/Users/username/NegAIT-master/stanford-corenlp-3.7.0/stanford-corenlp-3.7.0.jar:/Users/username/NegAIT-master/stanford-corenlp-3.7.0/stanford-corenlp-3.7.0-models.jar negate.NegationParser AagenaesSyndrome.txt AagenaesSyndromeNegation
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/pipeline/StanfordCoreNLP
at negate.TextRead.<init>(TextRead.java:48)
at negate.NegationParser.main(NegationParser.java:21)
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.pipeline.StanfordCoreNLP
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
As I said, I am familiar with Python but not with Java, if someone could help me out or give me a tip on how to run this tool I would highly appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
斯坦福·科伦普(Stanford Corenlp)在您的班级路径上没有发现。看起来这是因为您没有在
-CP
中的路径中替换用户名
。或者,如果您在
negait-Master
文件夹中运行赞誉,并且Corenlp Jar文件位于子目录stanford-corenlp-3.7.0
中,您会从那里可以简化班级路径:Stanford CoreNLP is not being found on your CLASSPATH. It looks like that is because you haven't substituted your login name for
username
in the paths in the-cp
.Or, if you are in running the commend inside the
NegAIT-master
folder, and the CoreNLP jar files are in a subdirectorystanford-corenlp-3.7.0
from there, you could simplify the CLASSPATH to: