PHPackages                             szyku/php-nltk-client - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. szyku/php-nltk-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

szyku/php-nltk-client
=====================

PHP client implementation for szyku/nltk-api

v1.1.2(9y ago)71042MITPHPPHP ^5.6 || ^7.0

Since May 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/szyku/php-nltk-client)[ Packagist](https://packagist.org/packages/szyku/php-nltk-client)[ Docs](https://github.com/szyku/nltk-api)[ RSS](/packages/szyku-php-nltk-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (5)Versions (7)Used By (0)

PHP NLTK API Client [![Build Status](https://camo.githubusercontent.com/b7771629a425d09de546d1d0e8829948651689ebff4bb38ae467ca1d1cd76ee2/68747470733a2f2f7472617669732d63692e6f72672f737a796b752f7068702d6e6c746b2d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/szyku/php-nltk-client)
==================================================================================================================================================================================================================================================================================================================

[](#php-nltk-api-client-)

This is a PHP client for [szyku/nltk-api](https://github.com/szyku/nltk-api) which exposes python's [NLTK resources](http://www.nltk.org/) and [WordNet database](https://wordnet.princeton.edu/) through a friendly API.

The aim of this client is to provide a comfortable and intuitive way of interacting with the NLTK API.

Installation
------------

[](#installation)

This package was tested for PHP &gt;= 5.6.

Composer:

```
composer require szyku/php-nltk-client
```

Git clone:

```
git clone git@github.com:szyku/php-nltk-client.git
```

Or download zip:

```
wget https://github.com/szyku/php-nltk-client/archive/master.zip
```

Or tarball:

```
wget https://github.com/szyku/php-nltk-client/archive/master.tar.gz
```

How to use it
-------------

[](#how-to-use-it)

Easy to setup:

```
require __DIR__ . '/vendor/autoload.php';

use GuzzleHttp\Psr7\Uri;
use Szyku\NLTK\Client;
use GuzzleHttp\Client as Guzzle;

$uri = new Uri("http://localhost:5000");
$guzzle = new Guzzle(['base_uri' => $uri]);
// or just $guzzle = new Guzzle(['base_uri' => 'http://localhost:5000']);

$nltkClient = new Client($guzzle);
```

How to query definitions with handy methods:

```
use Szyku\NLTK\Request\Dictionary\DefinitionLookupRequest;
use Szyku\NLTK\Request\Dictionary\SimilarLookupRequest;
use Szyku\NLTK\Request\Lemma\LemmatizationRequestBuilder as Builder;
use Szyku\NLTK\Request\Tagger\TaggingRequestBuilder as TaggerBuilder;

$similarWordsToCastle = SimilarLookupRequest::noun('castle');
$definitionsForRA = DefinitionLookupRequest::noun('rheumatoid arthritis');

$sentenceTagging = TaggerBuilder::create()
    ->add('He is a cunning man.')
    ->addMany(['Before and after.', 'Ups and downs'])
    ->build();

$lemmatizeSentence = Builder::create()
    ->adjective('biggest')
    ->noun('dogs')
    ->verb('fought')
    ->adverb('loudly')
    ->findAllFor('at')
    ->build();

// results are hydrated to objects like WordLookupResponse or LemmatizationResponse
$castleResult = $nltkClient->dictionary($similarWordsToCastle);
$raResult = $nltkClient->dictionary($definitionsForRA);
$lemmatizationResult = $nltkClient->lemmatization($lemmatizeSentence);
$taggingResult = $nltkClient->tagging($sentenceTagging);

// easy to consume
echo "Time taken in seconds: " . $castleResult->lookupTime();
echo "Searched for: " . $castleResult->queriedPhrase();

foreach ($castleResult->results() as $result) {
    echo $result->phrase() . ": " . $result->definition();
}
// prints "palace: A large and stately mansion"
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~5 days

Total

4

Last Release

3327d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/741f685ac70aad8558fd9b7eb673eb54ab08644beb2c1e725008869951b8531a?d=identicon)[szyku90](/maintainers/szyku90)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/szyku-php-nltk-client/health.svg)

```
[![Health](https://phpackages.com/badges/szyku-php-nltk-client/health.svg)](https://phpackages.com/packages/szyku-php-nltk-client)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M398](/packages/drupal-core-recommended)[imdhemy/google-play-billing

Google Play Billing

491.4M5](/packages/imdhemy-google-play-billing)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)[verbb/shippy

A framework agnostic, multi-carrier shipping library for PHP.

1611.3k2](/packages/verbb-shippy)

PHPackages © 2026

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