ngram_extract
Extract and count word- or character-level n-grams from text to identify frequent phrases or patterns, with configurable n, top results, and mode.
Instructions
Extract and count n-grams (word or character level) from text.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "ngram_extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | N-gram size (default 2). | |
| top | No | Number of top entries to return (default 20). | |
| mode | No | 'word' (default) or 'character'. | |
| text | Yes | Text to analyse. |