Package com.esprit.controllers.cinemas
Class SentimentAnalysisController
java.lang.Object
com.esprit.controllers.cinemas.SentimentAnalysisController
Is designed to analyze text sentiment using Stanford CoreNLP pipeline. It
takes a text input and returns a sentiment result as a string. The class
configures the pipeline properties, initializes the StanfordCoreNLP pipeline,
creates an annotation with the input text, and analyzes the text to extract
sentiment annotations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyzeSentiment
(String text) Analyzes a given text using Stanford CoreNLP pipeline to extract sentiment annotations, such as positive, negative or neutral.
-
Constructor Details
-
SentimentAnalysisController
public SentimentAnalysisController()
-
-
Method Details
-
analyzeSentiment
Analyzes a given text using Stanford CoreNLP pipeline to extract sentiment annotations, such as positive, negative or neutral. It returns the extracted sentiment in a string format.- Parameters:
text
- text to be analyzed for sentiment using the Stanford CoreNLP pipeline.
-