How to find Proper Nouns in a Text String in C# .NET Framework
1 min readJul 18, 2020
Identifying proper nouns can be quite a difficult chore, requiring a lot of handling for special cases and a whole range of other pitfalls that we won’t even go into here. Instead of dealing with that hot mess, today’s tutorial will lovingly guide you through a two-step process for setting up a means to get this functionality into your project. We’ll be done super quick, just wait.
First we will need our package:
Install-Package Cloudmersive.APIClient.NET.NLP -Version 4.0.9
Now we call our function for filtering proper nouns:
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 WordsProperNounsExample{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 proper nouns in a stringstring result = apiInstance.WordsProperNouns(input);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling WordsApi.WordsProperNouns: " + e.Message );}}}}
And you are officially done!