How to get Nouns from a Sentence in C# .NET Framework

Cloudmersive
1 min readJul 16, 2020

--

Natural Language Processing, or NLP, has been progressing by leaps and bounds as of late, with new advances in Deep Learning technology bringing about unprecedented levels of accuracy. If you don’t have a bleeding edge GPU and a couple weeks to spend training this type of AI, then you are probably looking for an easy way out. Well, I have just the thing!

First we are going to install our package via NuGet:

Install-Package Cloudmersive.APIClient.NET.NLP -Version 4.0.9

Now call our function like so.

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 WordsNounsExample{public void main(){// Configure API key authorization: ApikeyConfiguration.Default.AddApiKey("Apikey", "YOUR_API_KEY");// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed// Configuration.Default.AddApiKeyPrefix("Apikey", "Bearer");var apiInstance = new WordsApi();var input = input_example;  // string | Input stringtry{// Get nouns in stringstring result = apiInstance.WordsNouns(input);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling WordsApi.WordsNouns: " + e.Message );}}}}

And you’re done!

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

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

No responses yet