CogComp's Natural Language Processing Libraries and Demos: Modules include lemmatizer, ner, pos, prep-srl, quantifier, question type, relation-extraction, similarity, temporal normalizer, tokenizer, transliteration, verb-sense, and more.
It only worked when I switched the version to 4.0.13. But with 4.0.13, the code failed to execute.
Code:
import java.io.IOException;
import edu.illinois.cs.cogcomp.annotation.AnnotatorException;
import edu.illinois.cs.cogcomp.annotation.AnnotatorService;
import edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation;
import edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory;
import edu.illinois.cs.cogcomp.core.datastructures.ViewNames;
public class PipelineDemo {
public static void main(String[] args) throws IOException, AnnotatorException {
String docId = "APW-20140101.3018"; // arbitrary string identifier
String textId = "body"; // arbitrary string identifier
String text = "This is a test."; // contains plain text to be annotated
AnnotatorService pipeline = PipelineFactory.buildPipeline(ViewNames.POS, ViewNames.SRL_VERB);
TextAnnotation ta = pipeline.createAnnotatedTextAnnotation( docId, textId, text );
}
}
The exception is:
Exception in thread "main" java.lang.NoSuchMethodError: edu.illinois.cs.cogcomp.core.datastructures.ViewNames.getAllViewNames()Ljava/util/List;
at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.buildPipeline(PipelineFactory.java:72)
at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.buildPipeline(PipelineFactory.java:189)
at PipelineDemo.main(PipelineDemo.java:26)
Can somebody help me figure this out? Or is there any other ways to use this NLP tool(e.g. using jar)? Thx!
I created a maven project. The pom.xml is :
It only worked when I switched the version to 4.0.13. But with 4.0.13, the code failed to execute. Code:
The exception is:
Can somebody help me figure this out? Or is there any other ways to use this NLP tool(e.g. using jar)? Thx!