Download the PHP package lsmonki/php-open-calais without Composer

On this page you can find all versions of the php package lsmonki/php-open-calais. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-open-calais

Open Calais Tags

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.

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 "Request API Key" link at the top of their site.

Install via composer

Edit your composer.json file to include the following:

Usage

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\OpenCalais('your-api-key');
$entities = $oc->getEntities($content);

Example input

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.

Example output

Array
(
    [topics] => Array
        (
            [0] => Business_Finance
            [1] => Technology_Internet
        )

    [socialTag] => Array
        (
            [0] => Alibaba Group
            [1] => World Wide Web
            [2] => Yahoo!
            [3] => Steve Ballmer
            [4] => Microsoft
            [5] => Ballmer
            [6] => Jerry Yang
            [7] => Canaccord Genuity
        )

    [entities] => Array
        (
            [IndustryTerm] => Array
                (
                    [0] => software maker
                    [1] => Internet search
                    [2] => Internet
                )

            [Company] => Array
                (
                    [0] => Canaccord Adams
                    [1] => Yahoo
                    [2] => Google Inc.
                    [3] => Yahoo! Inc.
                    [4] => Microsoft Corp.
                )

            [Person] => Array
                (
                    [0] => Colin Gillis
                    [1] => Steve Ballmer
                    [2] => Jerry Yang
                )

            [Position] => Array
                (
                    [0] => Chief Executive Officer
                )

        )

)

Optional Settings

A number of settings exist which can be changed through public properties of the OpenCalais object: contentType (default: text/html), outputFormat (default: application/json). Refer to the OpenCalais documentation for more information.

This code is distributed under the MIT license. See http://www.opensource.org/licenses/mit-license.php


All versions of php-open-calais with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
neitanod/forceutf8 Version 2.x
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lsmonki/php-open-calais contains the following files

Loading the files please wait ....