classify_text
Classify text by sentiment, toxicity, spam, and language using keyword heuristics. Receive scores, character and word counts, and cost for any text input.
Instructions
Classify a piece of text with keyword heuristics.
Not a trained NLP or toxicity model. Scores sentiment (positive/negative/neutral), keyword toxicity, keyword spam, and optional langdetect language.
Args: text: The text to classify (up to ~5,000 characters recommended)
Returns: dict with keys: method (heuristic), sentiment, toxicity_score, spam_score, language, char_count, word_count, cost_usd
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |