C# and Java SDKs for the Pingar API
Posted by admin on May 21, 2011 RSS Icon RSS
 

The first time working with an API can be challenging. This blog post describes how to overcome some typical development hurdles and presents two new SDKs for developers in C# and Java.

The Pingar API simplifies development of applications that analyze unstructured text. Whether it's creating summaries, generating metadata, or analyzing search queries — there is no need to write code from scratch. The Pingar API is accessible via a SOAP service, which means you send us the text, and we send you back the analysis results.

There are some challenges, but we can share with you the solutions:

1. How to write a client to consume a SOAP web service?
This is pretty straightforward in ASP.Net. In Visual Studio, right click on your project and choose "Add Web Reference" or "Add Service Reference". Input the API address http://prodapi.pingar.com/PingarAPIService.asmx and this will automatically create the classes to use the API.

Different tools exist in other programming languages for this task. A great tool for Java is the Apache Axis and for Python there is the Suds library.

You can also take the short cut: Download either the C# SDK or the Java SDK, edit the API key and Application ID as described in both README files, and you are ready to go.

2. How to send documents to Pingar API?
The API allows the users to send text, but what about Word, PDF and HTML files, the actual documents as they were created by the authors?

Unformatted text has the advantage that it's much smaller than original documents and can be sent to a web service faster. There are several ways to extract text from other formats.

When working with ASP.Net, we recommend the iFilter plugins used in Windows to index files in many formats. A Windows computer usually already contains iFilters for Microsoft Office formats, and additional iFilters are easy to install. For example, PDFs can be processed using Adobe or Foxit iFilters. The Codeproject site has a useful walkthrough on how to use iFilter in C#.

If you are using Java, there are Apache tools like POI for Microsoft Word and PDFBox for PDF files. Another useful tool is Aperture which handles many different file formats.

Any other hurdles to get started with the Pingar API? Write to support@pingar.com - we would love to help you.

Comments:

You must be logged in/registered to leave a reply. Login/Register »
 

Explore Pingar


Share Points CIO Apache Solr BizSpark