Lemmatizer

FREEMIUM
By twinword
Updated 13 days ago
Text Analysis
8.1/10
Popularity Score
4226ms
Latency
88%
Success Rate

Lemmatizer API Documentation

"Dogs" to "dog", "abilities" to "ability". Get the root form of a word.

View API Details
Lemmatizer
GETExtract (get)
POSTExtract (post)
GETExtract (get)

Return the root of a word or roots of a string of words.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
textSTRING
REQUIREDEnter some text to extract roots (maximum 200 words or 3,000 characters)
Optional Parameters
flagSTRING
OPTIONALPass an optional flag to change output. If "VALID_TOKENS_ONLY" is passed, an array list is returned with only valid lemmas in the order found in the string passed in the text parameter. If "VALID_TOKENS_ONLY_ORDER_BY_OCCURRENCE" is passed, an array list is returned with only valid lemmas in the order of occurrence with the most occurring lemma first. If "VALID_TOKENS_ONLY_ORDER_BY_OCCURRENCE_SHOW_COUNT" (default) is passed, an array list is returned with only valid lemmas in the order of occurrence with the most occurring lemma first, but with the lemma in the key and the count in the value. If "ALL_TOKENS" is passed, an array list is returned with all the words in the string passed in the text parameter with words that could be lemmatized as lemmas and words that could not be lemmatized left as is. If "ALL_TOKENS_INVALID_LOWERCASED" is passed, an array list is returned with all the words in the string passed in the text parameter with words that could be lemmatized as lemmas and words that could not be lemmatized left as is, but lowercased. If "ALL_TOKENS_INVALID_EMPTY_STRING" is passed, an array list is returned with all the words in the string passed in the text parameter with words that could be lemmatized as lemmas and words that could not be lemmatized as empty-string items in the array. If "ALL_TOKENS_INVALID_NEGATIVE_ONE" is passed, an array list is returned with all the words in the string passed in the text parameter with words that could be lemmatized as lemmas and words that could not be lemmatized as -1. If "ALL_TOKENS_ORDER_BY_OCCURRENCE" is passed, an array list is returned with all the words in the string passed in the text parameter, with words that could be lemmatized as lemmas and words that could not be lemmatized left as is, all in the order of occurrence with the most occurring first. If "ALL_TOKENS_ORDER_BY_OCCURRENCE_SHOW_COUNT" is passed, an array list is returned with all the words in the string passed in the text parameter, with words that could be lemmatized as lemmas and words that could not be lemmatized left as is, all in the order of occurrence with the most occurring first, but with the words and lemmas in the key and the count in the value.
exclude_non_content_wordsBOOLEAN
OPTIONALOptional boolean to exclude non content words (ie. "the", "is", "take")
Code Snippet
unirest.get("https://twinword-lemmatizer1.p.rapidapi.com/extract/?text=The+frogs+hopped+from+rock+to+rock.")
.header("X-RapidAPI-Host", "twinword-lemmatizer1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://twinword-lemmatizer1.p.rapidapi.com/extract/
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://twinword-lemmatizer1.p.rapidapi.com/extract/?text=The+frogs+hopped+from+rock+to+rock.")
.header("X-RapidAPI-Host", "twinword-lemmatizer1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication