如何在java中使用NLP提取SVO,我是nlp.i中的新成员,目前使用的是opennlp。但是如何在java中用java做一个关于句子的问题。如何使用nlp提取主题动词对象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);
得到在 新LexicalizedParser( “englishPCFG.ser.gz”)的编译错误; ** 构造LexicalizedParser(字符串)是未定义
使用textrunner是更好的api for this – 2012-07-27 06:41:18