The Text Stemming API is used to get the root form of a word. It is useful for searching and natural language processing.
The API works on English text.
| Name | Example | Description |
|---|---|---|
text | The laziest dogs are jumping over the quicker brown foxes. | The English text to be stemmed. Max 2,000 characters for Latin-script text. Because the text travels in the URL, texts in other scripts are limited to about 800 characters. |
api-key | abcd1234 | Your API key. |
{
"original": "The laziest dogs are jumping over the quicker brown foxes",
"stemmed": "The laziest dog are jump over the quicker brown fox"
} Copy Code
curl -X GET 'https://api.apileague.com/stem-text?text=The+laziest+dogs+are+jumping+over+the+quicker+brown+foxes' \ -H 'x-api-key: myapikey'
Response Headers:
Content-Type: application/jsonX-API-Quota-Request: The number of tokens used by the requestX-API-Quota-Used: The number of tokens used in total todayX-API-Quota-Left: The number of tokens left today (depends on your plan)Stemming is the process of reducing a word to its base or root form. For example, "fishing", "fished", and "fisher" all stem to "fish".
The API uses algorithmic stemming which handles many common cases, but it may not always perfectly handle all irregular verbs compared to lemmatization.
Yes, stemming is commonly used in search engines to match queries with documents containing different variations of the same word.
The Stem Text API reduces words to their root form (e.g., "running" to "run"), while the Word Singularization/Pluralization API specifically converts words between singular and plural forms.