Bundle Natural language processing toolkit. Provides tokenization, text preprocessing, TF-IDF vectorization, cosine similarity, and sentiment analysis. Works with plain strings — no external model required. Compile with -lib nlp.
SentimentResult
Sentiment analysis result
Example
result := System.NLP.SentimentAnalyzer->AnalyzeDetailed("Great product!");
score := result->GetScore();
label := result->GetClassification();Operations
GetClassification #
Gets the classification label
method : public : GetClassification() ~ StringReturn
| Type | Description |
|---|---|
| String | classification (positive, negative, or neutral) |
Example
result := SentimentAnalyzer->AnalyzeDetailed("Awful product!");
result->GetClassification()->PrintLine();GetScore #
Gets the sentiment score
method : public : GetScore() ~ IntReturn
| Type | Description |
|---|---|
| Int | sentiment score |
Example
result := SentimentAnalyzer->AnalyzeDetailed("Great job!");
"Score: {$result->GetScore()}"->PrintLine();