Calais.NET is a .NET 3.5 project that provides a friendly API to the Calais web service.
What is Calais?
Here's the official description of the service from the opencalais.com website:
The Calais web service automatically attaches rich semantic metadata to the content you submit – in well under a second. Using natural language processing, machine learning and other methods, Calais categorizes and links your document with entities (people, places, organizations, etc.), facts (person ‘x’ works for company ‘y’), and events (person ‘z’ was appointed chairman of company ‘y’ on date ‘x’).
So, in short, Calais extracts metadata from content you supply. It takes input as HTML, XML or plain text, then tries to identify various types of metadata, such as companies, people, countries and quotations. For a full list of supported metadata types, see Calais Semantic Metadata.
A good demo of the the service is the Calais Document Viewer Java application from the OpenCalais website. Simply paste in some content, click 'Submit', and your original content will be returned with highlighted metadata.
The goal of Calais.NET is to provide the kind of functionality to .NET applications.
How to use Calais in your .NET project
The Calais.NET API wrapper makes Calais very simple to use from .NET. It exposes a straightforward .NET interface that abstracts away web service details like complex XML input parameters and verbose RDF output data by processing the data with LINQ to XML.
Calais.NET code example
string content = (new WebClient()).DownloadString("http://news.bbc.co.uk/");
CalaisDotNet calais = new CalaisDotNet(ApiKey, CalaisContentType.Html, content);
calais.Call();
IEnumerable<string> entities = calais.ExtractMetadata(CalaisMetadata.Country);
foreach (string entity in entities)
{
Console.WriteLine(entity);
}
Example output
Venezuela
Malta
United States
Canada
Sudan
Tibet
Spain
Serbia
China
Mozambique
United Kingdom
Sri Lanka
Download
Download Calais.NET from Codeplex and give it a try. C# .NET 3.5 source code included.