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

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!

Written by

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

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