How to find all Pronouns in a String in C# .NET Framework with NLP

Cloudmersive
1 min readJul 20, 2020

--

Finding pronouns can be quite a chore to accomplish in C#, with a large number of possible cases that need to be logically handled. This can take quite a long time to set up and end up being a buggy mess if you’re not careful. So instead, today I am going to be demonstrating a very simple means of getting this into your project, taking only a couple minutes of setup.

First, go ahead and grab our package:

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

Next we can call our function, as you see right here:

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 WordsPronounsExample{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{// Returns all pronounts in stringstring result = apiInstance.WordsPronouns(input);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling WordsApi.WordsPronouns: " + e.Message );}}}}

And finally… well, that’s it, really. 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