A while back, I worked on a project that required some natural language analysis of recent news articles from around the world. I decided to do this using a third party natural language processing API.
This led me to AlchemyAPI.
AlchemyAPI is an IBM company that provides twelve different semantic text analysis APIs that leverage state-of-the-art natural language processing techniques.
One of the provided APIs is AlchemyData News. This API provides the ability to carry out targeted semantic search and analysis of recent news articles and blogs from around the world.
For instance, using AlchemyData News, one can search for all positive news articles about Google published within the last 30 days.
AlchemyData News was exactly what I needed for my project. Since I was working with AngularJS and Node, my first instinct was to find a Node.js library for AlchemyData News. I felt this was necessary because AlchemyData News provides an extensive query language that I considered to be overkill for basic targeted search queries.
I also found the query language to be quite verbose, although I could see why it was so, considering that such a service must support complex and flexible queries.
Unfortunately, at the time, I was only able to find a Node.js library for the more mature and popular AlchemyLanguage API which provides general text analysis services.
I eventually resorted to making raw queries to AlchemyData News using the provided query language. However, in that moment, I decided to eventually get around to creating a simple Node.js library for AlchemyData News. My intention was to make it as similar as possible to the excellent Node.js API I had found for AlchemyLanguage.
I have recently completed a basic implementation of a Node.js library that simplifies some of the basic queries supported by the AlchemyData News API.
There are a lot of additions and improvements that can be made to the library especially with regard to supporting some of the more flexible querying capabilities provided by AlchemyAPI. However, this basic version provides the ability to retrieve:
- Categorized news content by searching for news on topics you care about e.g. baseball, mobile phones, etc.
- News content containing abstract concepts e.g. democracy, polygamy, etc.
- News content containing specific keywords where keywords are terms explicitly mentioned in the article that are determined to be highly relevant to the subject matter of the news article.
- News articles containing named entities e.g. proper nouns such as people, cities, companies, products, etc.
- News articles based on positive, negative or neutral sentiment.
The primary purpose of this Node.js library is to simplify the construction of some simple queries supported by AlchemyData News. It works for some basic queries but is far from being a complete mirror of the capabilities provided by AlchemyData News.
I encourage everyone who finds this useful to make changes, suggestions and contributions as necessary.
Documentation and source can be found here.
Cover Image, Untitled | Pablo LorenzoShare this article via: