This library allows you to easily use the Magnet API using C# via .NET.
Klangoo NLP API is a natural language processing (NLP) service that uses the rule-based paradigm and machine learning to recognize the aboutness of text. The service recognizes the category of the text, extracts key disambiguated topics, places, people, brands, events, and 41 other types of names; analyzes text using tokenization, parts of speech, parsing, word sense disambiguation, named entity recognition; and automatically finds the relatedness score between documents.
- This library is compatible with .Net Framework 4.x, .Net Core 2.x, .Net Core 3.x, .NET 5 and .NET 6
- An API Key Provided by Klangoo
- An API Secret Provided by Klangoo
PM> Install-Package Klangoo.Magnet.ApiClient
To use MagnetApiClient in your C# .NET project, you can download the Magnet API Library directly from our Github repository and reference it in your project.
This quick start tutorial will show you how to process a text.
To begin, you will need to initialize the client. In order to do this you will need your API Key CALK and Secret Key. You can find both on your Klangoo account.
using Klangoo.Client;
static void ProcessDocument()
{
string ENDPOINT = "https://nlp.klangoo.com/Service.svc";
string CALK = "enter your calk here";
string SECRET_KEY = "enter your secret key here";
MagnetAPIClient client = new MagnetAPIClient(ENDPOINT, CALK, SECRET_KEY);
string json = client.CallWebMethod("ProcessDocument",
new MagnetAPIClient.Params {
{ "text", "The United States of America (USA), commonly known as the United States (U.S.) or America, is a federal republic composed of 50 states, a federal district, five major self-governing territories, and various possessions." },
{ "lang", "en" },
{ "format", "json" } }, "POST");
Console.WriteLine(json);
}