PHPackages                             ollieparsley/corticalio - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ollieparsley/corticalio

AbandonedArchivedLibrary[API Development](/categories/api)

ollieparsley/corticalio
=======================

Client library for the cortical.io API

v1.0.1(7y ago)027MITPHPPHP &gt;=7.0

Since Jan 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ollieparsley/corticalio-php)[ Packagist](https://packagist.org/packages/ollieparsley/corticalio)[ RSS](/packages/ollieparsley-corticalio/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

PHP library for the cortical.io API
===================================

[](#php-library-for-the-corticalio-api)

Description
-----------

[](#description)

The official cortical.io PHP library is deprecated and no-longer maintained (). So, since I needed to use the API with a PHP service, I decided to create this library so that others could use it.

Links
-----

[](#links)

- REST API documentation: [https://www.cortical.io/resources\_apidocumentation.html](https://www.cortical.io/resources_apidocumentation.html)
- REST API console:
- Cortical.io website:

Requirements
------------

[](#requirements)

PHP &gt;= `7.0`

Usage
-----

[](#usage)

### Installation

[](#installation)

Recommended technique is to use composer

```
composer require ollieparsley/corticalio

```

### Making requests

[](#making-requests)

#### Retinas

[](#retinas)

```
$client = new \Corticalio\Client([
    'api_key' => 'MY_API_KEY',
]);

echo "List retinas: \n";
print_r($client->retinas->listRetinas());
echo "\n\n";

echo "Show retina en_associative: \n";
print_r($client->retinas->getRetina('en_associative'));
echo "\n\n";

```

#### Terms

[](#terms)

```
$client = new \Corticalio\Client([
    'api_key' => 'MY_API_KEY',
]);

echo "List terms: \n";
print_r($client->terms->listTerms('en_associative'));
echo "\n\n";

echo "Show term soccer using en_associative: \n";
print_r($client->terms->getTerm('en_associative', 'soccer'));
echo "\n\n";

echo "Show term contexts for soccer using en_associative: \n";
print_r($client->terms->listTermContexts('en_associative', 'soccer'));
echo "\n\n";

echo "Show similar terms to soccer using en_associative: \n";
print_r($client->terms->listSimilarTerms('en_associative', 'soccer'));
echo "\n\n";

```

#### Compare

[](#compare)

```
$client = new \Corticalio\Client([
    'api_key' => 'MY_API_KEY',
]);

echo "Compare 2 elements using en_associative: \n";
$element1 = new \Corticalio\Model\ExpressionElement();
$element1->text = 'Manchester City lost the football match';
$element2 = new \Corticalio\Model\ExpressionElement();
$element2->text = 'Manchester United won the football match';
print_r($client->compare->compare('en_associative', $element1, $element2));
echo "\n\n";

echo "Bulk compare element pairs en_associative: \n";
$elementPairs = new \Corticalio\Model\ExpressionElementArray();
$elementPairs->addPair($element1, $element2);
$elementPairs->addPair($element2, $element1);
print_r($client->compare->bulkCompare('en_associative', $elementPairs));
echo "\n\n";

```

### Exceptions

[](#exceptions)

There is a generic `Corticalio\Exception` class that is extended for some specific reasons to use. Anything that does not throw from this base exception will most-likely be coming from a dependency such a Guzzle.

API Sections
------------

[](#api-sections)

### Covered

[](#covered)

These API sections are covered by the client library

- Retinas
- Terms
- Compare

### Todo

[](#todo)

These haven't been done yet. I do want to complete the library with these though

- Text
- Expression
- Image
- Classify

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/ollieparsley/corticalio-php/tags).

Authors
-------

[](#authors)

- **Ollie Parsley** - *All work so far!* - [Github](https://github.com/ollieparsley) | [Twitter](https://twitter.com/ollieparsley)

Contributing
------------

[](#contributing)

Please do contribute to this library. Please submit pull requests and I'll do my best to review them and merge if appropriate.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2688d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e4e1dcf0a80e8b7a37339b6486e33be6c3d38ed49f8b93947721f8e8d1a6c90?d=identicon)[ollieparsley](/maintainers/ollieparsley)

---

Top Contributors

[![ollieparsley](https://avatars.githubusercontent.com/u/185771?v=4)](https://github.com/ollieparsley "ollieparsley (4 commits)")

### Embed Badge

![Health badge](/badges/ollieparsley-corticalio/health.svg)

```
[![Health](https://phpackages.com/badges/ollieparsley-corticalio/health.svg)](https://phpackages.com/packages/ollieparsley-corticalio)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
