SentimentAnalyzer
Basic lexicon-based sentiment analysis
text := "This is absolutely wonderful and amazing!";
score := System.NLP.SentimentAnalyzer->Analyze(text);
classification := System.NLP.SentimentAnalyzer->Classify(text);
result := System.NLP.SentimentAnalyzer->AnalyzeDetailed(text);
result->ToString()->PrintLine();Operations
Analyze
Analyzes sentiment of text and returns a sentiment score
function : Analyze(text:String) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| text | String | input text to analyze |
Return
| Type | Description |
|---|---|
| Int | sentiment score (positive = positive sentiment, negative = negative sentiment, 0 = neutral) |
AnalyzeDetailed
Gets detailed sentiment analysis with scores
function : AnalyzeDetailed(text:String) ~ SentimentResultParameters
| Name | Type | Description |
|---|---|---|
| text | String | input text to analyze |
Return
| Type | Description |
|---|---|
| SentimentResult | sentiment result with score and classification |