Open Calais Tags is a PHP class for extracting entities and tags 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:
PHP-OpenCalais.zip (updated 6/10/2015)
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 “Access API” link at the site.
The Open Calais Tags class takes a document (text or HTML string) as input, and returns an array as output. The array’s keys are the entity types detected in the text, and the values are the entities found.
April 7 (Bloomberg) — Yahoo! Inc., the Internet company that snubbed a $44.6 billion takeover bid from Microsoft Corp., may drop in Nasdaq trading after the software maker threatened to cut its bid if directors fail to give in soon.
If Yahoo’s directors refuse to negotiate a deal within three weeks, Microsoft plans to nominate a board slate and take its case to investors, Chief Executive Officer Steve Ballmer said April 5 in a statement. He suggested the deal’s value might decline if Microsoft has to take those steps.
The ultimatum may send Yahoo Chief Executive Officer Jerry Yang scrambling to find an appealing alternative for investors to avoid succumbing to Microsoft, whose bid was a 62 percent premium to Yahoo’s stock price at the time. The deadline shows Microsoft is in a hurry to take on Google Inc., which dominates in Internet search, said analysts including Canaccord Adams’s Colin Gillis.
Array ( [Industry Term] => Array (  => Internet  => software maker  => Internet search ) [Person] => Array (  => Steve Ballmer  => Jerry Yang  => Colin Gillis ) [Company] => Array (  => Google Inc.  => Canaccord Adams  => Yahoo!  => Microsoft Corp. ) [Currency] => Array (  => USD ) [SocialTag] => Array (  => New encyclopedism  => Microsoft  => Jerry Yang  => Steve Ballmer  => Bing  => Yahoo!  => Internet search engines  => Hypertext ) )
Basic usage is simple. Create an instance of the class with your API key, and call the getEntities method using your content string.
$oc = new OpenCalais('your-api-token');
$entities = $oc->getEntities($content);
This class is distributed under an open source BSD license. The license terms can be found in license.txt of the code archive.