我刚刚开始研究斯坦福大学NLP库。我下载并解压缩了包含所有内容的核心文件,然后尝试运行演示文件(StanfordCoreNlpDemo.java)。

import edu.stanford.nlp.io.*;
import edu.stanford.nlp.ling.*;
import edu.stanford.nlp.pipeline.*;
import edu.stanford.nlp.semgraph.SemanticGraph;
import edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations;
import edu.stanford.nlp.trees.*;
import edu.stanford.nlp.util.*;

所有导入行均触发“错误:包edu.stanford.nlp。不存在”消息。

谁能告诉我要进行演示工作我需要做什么?

最佳答案

在编译核心Java文件时通过以下方式包含类路径:
javac -cp stanford-corenlp-3.5.0.jar filename.java

09-11 05:16
查看更多