semantics - Getting the error while integrating stanford sentiment analysis with java -


I'm working on sentiment analysis using Stanford spirit NLP library with Java. But when I am executing the code, I am getting the error. Not able to understand it.

My code is as follows:

  package com.nlp; Import java.util.Properties; Import edu.stanford.nlp.ling.CoreAnnotations; Import edu.stanford.nlp.pipeline.Annotation; Import edu.stanford.nlp.pipeline.StanfordCoreNLP; Import edu.stanford.nlp.rnn.RNNCoreAnnotations; Import edu.stanford.nlp.sentiment.SentimentCoreAnnotations; Import edu.stanford.nlp.trees.Tree; Import edu.stanford.nlp.util.CoreMap; Public class SemanticAnalysis {public static void (String args []) {sentimentAnalysis sense = new sentimentAnalysis (); Sentiment.findSentiment ("France is a good city"); }} Class emotion analysis {public string search sentence (string line) {property property = new properties (); Props.setProperty ("annotator", "tonkenize, ssplit, pars, emotion"); Stanford Corrierier NLP Pipeline = New Stanfordcore NLP (Props); Int maincentant = 0; If (line! = Null & line.length ()> gt; {int longest = 0; Annotation annotation = pipeline. Process (line); For (CoreMap sentence: annotation.get (CoreAnnotations.SentencesAnnotation.class)) {tree = sentence.get (SentimentCoreAnnotations.AnnotatedTree.class); Int spirit = R nncornotation.GetchedClassclass (tree); String partText = sentence Tracing (); If (partText.length () & gt; longest) {main sequence = emotion; The longest = partText.length (); }}} If (main salary == 2+ main oranges & gt; 4} main oranges <0) {return tap; } Return ""; }}  

But when I'm running the code I am getting the following error

  exception in thread "main" java.lang.NoClassDefFoundError :. On Org / ejml / Simple / SimpleBase edu.stanford.nlp.pipeline.SentimentAnnotator & Lt; Init & gt; edu .stanford.nlp.pipeline.AnnotatorPool.get (AnnotatorPool.java:81) on edu.stanford.nlp.pipeline.StanfordCoreNLP $ 14.create (StanfordCoreNLP.java:845) to (SentimentAnnotator.java:45)  

you're missing ejml-0.23.jar, add it to your class path and it Should work.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -