Cloudmersive Natural Language Processing

Cloudmersive Natural Language Processing

  • Category: Text Analysis


A Guide to the Cloudmersive NLP API

The Cloudmersive NLP API is a powerful tool to analyze and process natural language. With this API, you can extract keywords and entities from a text, determine sentiment and emotion, and perform text matching. In this article, we will walk through some examples of using the Cloudmersive NLP API using JavaScript.

Installation

To use the Cloudmersive NLP API, you will need to install the cloudmersive-nlp-api-client package using npm:

npm install cloudmersive-nlp-api-client

Example 1: Extracting Keywords

The following code snippet demonstrates how to extract keywords from a given text using the Cloudmersive NLP API:

const CloudmersiveNLPApi = require('cloudmersive-nlp-api-client');

const defaultClient = CloudmersiveNLPApi.ApiClient.instance;

const APIKey = 'YOUR_API_KEY';

// Set API key
defaultClient.authentications['Apikey'].apiKey = APIKey;

const apiInstance = new CloudmersiveNLPApi.KeywordExtractorApi();

const inputText = 'This is a sample text to extract keywords from.';

apiInstance.keywordExtractorExtract(inputText, (error, data) => {
  if (error) {
    console.error(error);
  } else {
    console.log('Keywords: ' + data.keywords);
  }
});

Replace YOUR_API_KEY with your actual API key.

Example 2: Determining Sentiment

The following code snippet demonstrates how to determine the sentiment of a given text using the Cloudmersive NLP API:

const CloudmersiveNLPApi = require('cloudmersive-nlp-api-client');

const defaultClient = CloudmersiveNLPApi.ApiClient.instance;

const APIKey = 'YOUR_API_KEY';

// Set API key
defaultClient.authentications['Apikey'].apiKey = APIKey;

const apiInstance = new CloudmersiveNLPApi.SentimentAnalysisApi();

const inputText = 'This is a positive text.';

apiInstance.sentimentAnalysisSentimentPost(inputText, (error, data) => {
  if (error) {
    console.error(error);
  } else {
    console.log('Sentiment: ' + data.sentiment);
  }
});

Replace YOUR_API_KEY with your actual API key.

Example 3: Text Matching

The following code snippet demonstrates how to perform text matching using the Cloudmersive NLP API:

const CloudmersiveNLPApi = require('cloudmersive-nlp-api-client');

const defaultClient = CloudmersiveNLPApi.ApiClient.instance;

const APIKey = 'YOUR_API_KEY';

// Set API key
defaultClient.authentications['Apikey'].apiKey = APIKey;

const apiInstance = new CloudmersiveNLPApi.StringOperationsApi();

const inputText = 'This is a text to match.';

const pattern = 'text';

apiInstance.stringOperationsPatternMatching(inputText, pattern, (error, data) => {
  if (error) {
    console.error(error);
  } else {
    console.log('Match found: ' + data.matchFound);
  }
});

Replace YOUR_API_KEY with your actual API key.

Conclusion

The Cloudmersive NLP API provides a wide range of functionalities to analyze and process natural language. In this article, we have walked through some examples of using the API with JavaScript. You can explore more functionalities of the API by referring to the official Cloudmersive NLP API documentation.

Visit to Cloudmersive Natural Language Processing website

Similar APIs of Text Analysis

Name Parser

Name Parser

Text Analysis

Name Parser is an API service that splits a complete name into useful information such as first name, last name, gender and nationality.

nameparsergender

Optical Character Recognition

Optical Character Recognition

Text Analysis

Analysis text from image. The free OCR API provides a simple way of parsing images and multi-page PDF documents (PDF OCR) and getting the extracted text results returned in a JSON format. The API can be used from any internet-connected device (desktop, mobile, iPhone, Android, Windows phone, refrigerator...). For even faster response times and guaranteed uptime PRO plans are available. In addition, we offer a locally (on-premise) installable version with our OCR.space Local Enterprise licenses.

OCRimgtext

Language Detection API

Language Detection API

Text Analysis

Detects text language. Language identification JSON webservice accepts text and returns detected language code and score. Detects 164 languages Fast, supports batching Supports short phrases and single words Secure

languagefastsupport

Google Cloud Natural

Google Cloud Natural

Text Analysis

Natural language understanding technologies to developers, including sentiment, entity, and syntax analysis. This API is part of the larger Cloud Machine Learning API family.

languagenaturalcloud

Semantira

Semantira

Text Analysis

Text Analytics with sentiment analysis, categorization & named entity extraction. Uncover context-rich patterns and insights hidden within mountains of social comments, surveys, reviews, and any other text documents See who’s talking, what they’re talking about, how they feel, and why.

richcontextinsights

Aylien Text Analysis

Aylien Text Analysis

Text Analysis

A collection of information retrieval, and natural language APIs. A content analysis API used for collecting and analyzing news content at scale. An easy-to-use API used to perform a variety of complex NLP tasks on documents, reviews, social comments, or any other type of text. A user friendly platform that makes training custom NLP models easy.

analysissearchfeed

Watson Natural Language Understanding

Watson Natural Language Understanding

Text Analysis

Natural language processing for advanced text analysis. Analyze various features of text content at scale. Provide text, raw HTML, or a public URL and IBM Watson Natural Language Understanding will give you results for the features you request. The service cleans HTML content before analysis by default, so the results can ignore most advertisements and other unwanted content.

rawhtmlanalytics