Stanford NLP Sentiment, sentences in a new line
I am trying to use Stanford NLP Sentiment Analysis on a file with a new sentence on each line using this command:
C:\Users\alonr\IdeaProjects\stanford-corenlp-full-2014-08-27>java -cp "*" -mx2g
edu.stanford.nlp.sentiment.SentimentPipeline -input TEXT -output PROBABILITIES -file
my_file.txt
Unfortunately it doesn't recognize line brakes in the file as suggestion brakes. How can i do this?
+3
source to share
1 answer
The main program is SentimentPipeline
not configured to change offer spreads. However, if you are using Stanford CoreNLP, you can pipe through the main CoreNLP pipeline instead of a flag -ssplit.eolonly
:
java -cp "*" -mx2g edu.stanford.nlp.pipeline.StanfordCoreNLP \
-annotators tokenize,ssplit,pos,parse,sentiment -ssplit.eolonly \
-inputFile my_input.txt -outputFormat text -outputFile my_file.txt
0
source to share