PHPackages                             agentile/php-stanford-nlp - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. agentile/php-stanford-nlp

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

agentile/php-stanford-nlp
=========================

PHP interface to Stanford NLP Tools

0.1.1(8y ago)16557.1k49[12 issues](https://github.com/agentile/PHP-Stanford-NLP/issues)[2 PRs](https://github.com/agentile/PHP-Stanford-NLP/pulls)MITPHPPHP &gt;=5.3.0

Since Oct 18Pushed 5y ago15 watchersCompare

[ Source](https://github.com/agentile/PHP-Stanford-NLP)[ Packagist](https://packagist.org/packages/agentile/php-stanford-nlp)[ Docs](https://github.com/agentile/PHP-Stanford-NLP)[ RSS](/packages/agentile-php-stanford-nlp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP-Stanford-NLP
================

[](#php-stanford-nlp)

PHP interface to Stanford NLP Tools (POS Tagger, NER, Parser)

This library was tested against individual jar files for each package version 3.8.0 (english).

It was NOT built for use with the [Stanford CoreNLP](http://nlp.stanford.edu/software/corenlp.shtml).

### Installation

[](#installation)

This library requires PHP 5.3 or later.

It is available via Composer as [agentile/php-stanford-nlp](https://packagist.org/packages/agentile/php-stanford-nlp).

You may also clone this repository, then require or include its *autoload.php* file.

POS Tagger
----------

[](#pos-tagger)

Mimicks [http://nltk.org/\_modules/nltk/tag/stanford.html#StanfordTagger](http://nltk.org/_modules/nltk/tag/stanford.html#StanfordTagger)

### Example Usage

[](#example-usage)

See examples [here](https://github.com/agentile/PHP-Stanford-NLP/tree/master/examples)

```
$pos = new \StanfordNLP\POSTagger(
  '/path/to/stanford-postagger-2017-06-09/models/english-left3words-distsim.tagger',
  '/path/to/stanford-postagger-2017-06-09/stanford-postagger-3.8.0.jar'
);
$result = $pos->tag(explode(' ', "What does the fox say?"));
var_dump($result);
```

NER Tagger
----------

[](#ner-tagger)

Mimicks [http://nltk.org/\_modules/nltk/tag/stanford.html#StanfordTagger](http://nltk.org/_modules/nltk/tag/stanford.html#StanfordTagger)

### Example Usage

[](#example-usage-1)

```
$pos = new \StanfordNLP\NERTagger(
  '/path/to/stanford-ner-2017-06-09/classifiers/english.all.3class.distsim.crf.ser.gz',
  '/path/to/stanford-ner-2017-06-09/stanford-ner-3.8.0.jar'
);
$result = $pos->tag(explode(' ', "The Federal Reserve Bank of New York led by Timothy R. Geithner."));
var_dump($result);
```

Parser
------

[](#parser)

### Example Usage

[](#example-usage-2)

```
$parser = new \StanfordNLP\Parser(
  '/path/to/stanford-parser-full-2017-06-09/stanford-parser.jar',
  '/path/to/stanford-parser-full-2017-06-09/stanford-parser-3.8.0-models.jar'
);
$result = $parser->parseSentence("What does the fox say?");
var_dump($result);
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a547f5ac15fe000cd904e9eeb04c3d67372e0f3f12da0514928c64fa83163b9?d=identicon)[agentile](/maintainers/agentile)

---

Top Contributors

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

---

Tags

parserposnlpnerstanford

### Embed Badge

![Health badge](/badges/agentile-php-stanford-nlp/health.svg)

```
[![Health](https://phpackages.com/badges/agentile-php-stanford-nlp/health.svg)](https://phpackages.com/packages/agentile-php-stanford-nlp)
```

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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