Skip to content

Cloudmersive/Cloudmersive.APIClient.NET.NLP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudmersive.APIClient.NET.NLP - the C# library for the nlpapiv2

The powerful Natural Language Processing APIs (v2) let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.

This C# SDK is for the Cloudmersive Natural Language Processing API:

  • API version: v1
  • SDK version: 4.1.1
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Cloudmersive.APIClient.NET.NLP.Api;
using Cloudmersive.APIClient.NET.NLP.Client;
using Cloudmersive.APIClient.NET.NLP.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Cloudmersive.APIClient.NET.NLP.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.NLP.Api;
using Cloudmersive.APIClient.NET.NLP.Client;
using Cloudmersive.APIClient.NET.NLP.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            // Configure API key authorization: Apikey
            Configuration.Default.ApiKey.Add("Apikey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Apikey", "Bearer");

            var apiInstance = new AnalyticsApi();
            var input = new HateSpeechAnalysisRequest(); // HateSpeechAnalysisRequest | Input hate speech analysis request

            try
            {
                // Perform Hate Speech Analysis and Detection on Text
                HateSpeechAnalysisResponse result = apiInstance.AnalyticsHateSpeech(input);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AnalyticsApi.AnalyticsHateSpeech: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.cloudmersive.com

Class Method HTTP request Description
AnalyticsApi AnalyticsHateSpeech POST /nlp-v2/analytics/hate-speech Perform Hate Speech Analysis and Detection on Text
AnalyticsApi AnalyticsProfanity POST /nlp-v2/analytics/profanity Perform Profanity and Obscene Language Analysis and Detection on Text
AnalyticsApi AnalyticsSentiment POST /nlp-v2/analytics/sentiment Perform Sentiment Analysis and Classification on Text
AnalyticsApi AnalyticsSimilarity POST /nlp-v2/analytics/similarity Perform Semantic Similarity Comparison of Two Strings
AnalyticsApi AnalyticsSubjectivity POST /nlp-v2/analytics/subjectivity Perform Subjectivity and Objectivity Analysis on Text
ExtractEntitiesApi ExtractEntitiesPost POST /nlp-v2/extract-entities Extract entities from string
LanguageDetectionApi LanguageDetectionGetLanguage POST /nlp-v2/language/detect Detect language of text
LanguageTranslationApi LanguageTranslationTranslateDeuToEng POST /nlp-v2/translate/language/deu/to/eng Translate German to English text with Deep Learning AI
LanguageTranslationApi LanguageTranslationTranslateEngToDeu POST /nlp-v2/translate/language/eng/to/deu Translate English to German text with Deep Learning AI
LanguageTranslationApi LanguageTranslationTranslateEngToFra POST /nlp-v2/translate/language/eng/to/fra Translate English to French text with Deep Learning AI
LanguageTranslationApi LanguageTranslationTranslateEngToRus POST /nlp-v2/translate/language/eng/to/rus Translate English to Russian text with Deep Learning AI
LanguageTranslationApi LanguageTranslationTranslateFraToEng POST /nlp-v2/translate/language/fra/to/eng Translate French to English text with Deep Learning AI
LanguageTranslationApi LanguageTranslationTranslateRusToEng POST /nlp-v2/translate/language/rus/to/eng Translate Russian to English text with Deep Learning AI
ParseApi ParseParseString POST /nlp-v2/parse/tree Parse string to syntax tree
PosTaggerApi PosTaggerTagAdjectives POST /nlp-v2/pos/tag/adjectives Part-of-speech tag a string, filter to adjectives
PosTaggerApi PosTaggerTagAdverbs POST /nlp-v2/pos/tag/adverbs Part-of-speech tag a string, filter to adverbs
PosTaggerApi PosTaggerTagNouns POST /nlp-v2/pos/tag/nouns Part-of-speech tag a string, filter to nouns
PosTaggerApi PosTaggerTagPronouns POST /nlp-v2/pos/tag/pronouns Part-of-speech tag a string, filter to pronouns
PosTaggerApi PosTaggerTagSentence POST /nlp-v2/pos/tag/sentence Part-of-speech tag a string
PosTaggerApi PosTaggerTagVerbs POST /nlp-v2/pos/tag/verbs Part-of-speech tag a string, filter to verbs
RephraseApi RephraseEnglishRephraseSentenceBySentence POST /nlp-v2/rephrase/rephrase/eng/by-sentence Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
SegmentationApi SegmentationGetSentences POST /nlp-v2/segmentation/sentences Extract sentences from string
SegmentationApi SegmentationGetWords POST /nlp-v2/segmentation/words Get words in input string
SpellcheckApi SpellcheckCheckSentence POST /nlp-v2/spellcheck/check/sentence Check if sentence is spelled correctly
SpellcheckApi SpellcheckCorrectJson POST /nlp-v2/spellcheck/check/word Find spelling corrections

Documentation for Models

Documentation for Authorization

Apikey

  • Type: API key
  • API key parameter name: Apikey
  • Location: HTTP header

About

.NET Framework Client for Cloudmersive NLP APIs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages