ai-classify
AI text classification for sentiment, intent, spam and custom categories. Single or multi-label with your own category list.
Install
ppm install ai-classify
Usage Example
uses ai_classify;
// Custom categories
var topics := List.Create;
topics.Add('technology'); topics.Add('sports'); topics.Add('politics');
WriteLn(Classify(articleText, topics)); // technology
// Sentiment
WriteLn(Sentiment('I love this!')); // positive
WriteLn(Sentiment('Terrible!')); // negative
// Intent detection
WriteLn(Intent('Can you help me?')); // question
WriteLn(Intent('Cancel my subscription')); // request
// Spam filter
if IsSpam(emailBody) then MoveToSpam(email);
// Multi-label
var all := ClassifyMulti(text, topics);
Features
Custom label classification
Multi-label (all matching categories)
Sentiment: positive/negative/neutral
Intent: question/request/complaint/compliment
Built-in spam filter and language detection