FunctionsTokenize
Word To Root Stem
ai-research-agent / tokenize/word-to-root-stem
Topics
stemWordToRoot()
function stemWordToRoot(word: string): string;Defined in: src/tokenize/word-to-root-stem.js:12
Stems a word using the Porter Stemmer for removing inflectional endings like "ing", "ist", "ize".
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The word to be stemmed |
Returns
string
- The stemmed word
Author
Example
var rootWord = stemWordToRoot("running"); // returns "run"