How to Separate all Words in a String in Node.JS with NLP

"dependencies": {
"cloudmersive-nlp-api-client": "^1.1.2"
}
var CloudmersiveNlpApiClient = require('cloudmersive-nlp-api-client');var defaultClient = CloudmersiveNlpApiClient.ApiClient.instance;// Configure API key authorization: Apikeyvar Apikey = defaultClient.authentications['Apikey'];Apikey.apiKey = 'YOUR API KEY';// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)//Apikey.apiKeyPrefix = 'Token';var apiInstance = new CloudmersiveNlpApiClient.WordsApi();var input = "input_example"; // String | Input stringvar callback = function(error, data, response) {if (error) {console.error(error);} else {console.log('API called successfully. Returned data: ' + data);}};apiInstance.wordsGetWordsString(input, callback);
{
"Words": [
{
"Word": "The",
"WordIndex": 0,
"StartPosition": 0,
"EndPosition": 3
},
{
"Word": "quick",
"WordIndex": 1,
"StartPosition": 4,
"EndPosition": 9
},
{
"Word": "brown",
"WordIndex": 2,
"StartPosition": 10,
"EndPosition": 15
},
{
"Word": "fox",
"WordIndex": 3,
"StartPosition": 16,
"EndPosition": 19
},
{
"Word": "jumps",
"WordIndex": 4,
"StartPosition": 20,
"EndPosition": 25
},
{
"Word": "over",
"WordIndex": 5,
"StartPosition": 26,
"EndPosition": 30
},
{
"Word": "the",
"WordIndex": 6,
"StartPosition": 31,
"EndPosition": 34
},
{
"Word": "lazy",
"WordIndex": 7,
"StartPosition": 35,
"EndPosition": 39
},
{
"Word": "dog",
"WordIndex": 8,
"StartPosition": 40,
"EndPosition": 43
}
]
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.