如何在java中使用NLP提取SVO,我是nlp.i的新手,目前正在使用opennlp.但是如何在java中使用java句子中的特定句子.
LexicalizedParser lp = **new LexicalizedParser("englishPCFG.ser.gz");**
String[] sent = { "This", "is", "an", "easy", "sentence", "." };
Tree parse = (Tree) lp.apply(Arrays.asList(sent));
parse.pennPrint();
System.out.println();
TreePrint tp = new TreePrint("penn,typedDependenciesCollapsed");
tp.print(parse);
Run Code Online (Sandbox Code Playgroud)
在新的LexicalizedParser("englishPCFG.ser.gz")中获取编译错误;**构造函数LexicalizedParser(String)未定义
nlp ×1