Open Calais TagsOpen Calais Tags is a PHP class for extracting entities from text using Open Calais. Calais performs semantic analysis of the text, using natural language processing to identify concepts like people, companies and technologies discussed in the text. These are especially useful for suggesting tags for your content such as website articles or blog posts. You could even automatically tag archived content that would take days to go through manually. You can download the class and example usage here: Calais is free for both personal and commercial use, and usage of this class requires a Calais API key. Getting an API key is an easy, automated process. Just click the “Register” link at the top of the site, then request a key through their automated system. The Open Calais Tags class takes a content string as input, as well as a number of options, and returns a multidimensional array as output. The array’s keys are the entity types detected in the text, and the values are the entities found. Example input:
Example output: Array
(
[Industry Term] => Array
(
[0] => Internet
[1] => software maker
[2] => Internet search
)
[Person] => Array
(
[0] => Steve Ballmer
[1] => Jerry Yang
[2] => Colin Gillis
)
[Company] => Array
(
[0] => Google Inc.
[1] => Canaccord Adams
[2] => Yahoo!
[3] => Microsoft Corp.
)
[Currency] => Array
(
[0] => USD
)
)
Basic usage is simple. Create an instance of the class with your API key, and call the getEntities method using your content string.
A number of settings exist which can be changed through setters on the OpenCalais object:
This class is distributed under an open source BSD license. The license terms can be found in license.txt of the code archive. |
Self-promotionRecent Comments
Activity Stream
Popular Posts
|




[…] just completed the WP Calais Auto Tagger plugin, the obvious first use of my Open Calais Tags class. It adds a tag suggestion box to your WordPress post writing screen which suggests tags based on […]
[…] a PHP class for passing content to Open Calais and getting back tags. Then, a WordPress plugin for tagging […]
[…] never in a million years related to it, until of course I saw the tag. The class in the article Open Calais Tags might be what I need, I’m sure it will make its way into Zend Framework by next week. Oh YAY it is […]
[…] Dan Grossman ยป Open Calais Tags (tags: php library tagging calais opencalais api) […]
[…] updated my Open Calais PHP Class with the entity types added in Calais’ last update. It now matches a bunch of new […]