PHPackages                             dennis-de-swart/php-stanford-nlp-datastore - 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. dennis-de-swart/php-stanford-nlp-datastore

ActiveLibrary

dennis-de-swart/php-stanford-nlp-datastore
==========================================

Stores NLP data from Stanford CoreNLP server.

2.2.0(9y ago)4701MITPHPPHP &gt;=5.3

Since Jan 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/DennisDeSwart/php-stanford-nlp-datastore)[ Packagist](https://packagist.org/packages/dennis-de-swart/php-stanford-nlp-datastore)[ Docs](https://github.com/DennisDeSwart/PHP-Stanford-NLP-Datastore)[ RSS](/packages/dennis-de-swart-php-stanford-nlp-datastore/feed)WikiDiscussions master Synced 2mo ago

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

PHP Stanford NLP Datastore
==========================

[](#php-stanford-nlp-datastore)

[![Version](https://camo.githubusercontent.com/66f0d3d585f68212bb7af8a93bd6953e7392437c5a81f3c2edad4595ce1aaafa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656e6e69732d64652d73776172742f7068702d7374616e666f72642d6e6c702d6461746173746f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dennis-de-swart/php-stanford-nlp-datastore)[![Total Downloads](https://camo.githubusercontent.com/bc4eec74572004e0034ae0be0e8f3fdde7dbacfacb6940f637d750631cc321e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656e6e69732d64652d73776172742f7068702d7374616e666f72642d6e6c702d6461746173746f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dennis-de-swart/php-stanford-nlp-datastore)[![Maintenance](https://camo.githubusercontent.com/103880b37e0f73f7e9171ab789edfde215270e80ef6e227871e0d210e2dd3127/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032302e7376673f7374796c653d666c61742d737175617265)](https://github.com/DennisDeSwart/php-stanford-nlp-datastore)[![Minimum PHP Version](https://camo.githubusercontent.com/5a7c0787478081952cc7cf21092df637a2ca9e4d9a34dc81fac6422510a1e31a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3441433531432e7376673f7374796c653d666c61742d737175617265)](http://php.net/)[![License](https://camo.githubusercontent.com/11a2767706334b4ba72ea9002fc1320f2741ab9b140f3a7d038f39cb12479a52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64656e6e69732d64652d73776172742f7068702d7374616e666f72642d6e6c702d6461746173746f72652e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)

Stores NLP data from Stanford CoreNLP server.

What does it do?
----------------

[](#what-does-it-do)

It analyses a text using Stanford CoreNLP server, then stores the result.

Which data gets stored?
-----------------------

[](#which-data-gets-stored)

- OpenIE: these are "Subject-Relation-Object" triples. The concept is similar to "Subject-Verb-Object" triples.

```
http://stanfordnlp.github.io/CoreNLP/openie.html

```

- Named-Entities: if a word is a "Named Entity", like a Location, Name or Time, it will store this data

```
http://stanfordnlp.github.io/CoreNLP/ner.html

```

- Coreference: if there is a reference to a word in another sentence.

```
http://stanfordnlp.github.io/CoreNLP/coref.html

```

How does it work?
-----------------

[](#how-does-it-work)

- You submit a text.
- The text is analyzed by the Stanford CoreNLP server
- Results are stored in a SQLite file based database. The database file is called "datastore.db"

```
https://sqlite.org/
https://github.com/sqlitebrowser

```

- The results are displayed on screen
- There is also a search form to find data

This package depends on Stanford CoreNLP Server
-----------------------------------------------

[](#this-package-depends-on-stanford-corenlp-server)

```
http://stanfordnlp.github.io/CoreNLP/index.html#download

```

This package also depends on PHP-Stanford-CoreNLP-Adapter
---------------------------------------------------------

[](#this-package-also-depends-on-php-stanford-corenlp-adapter)

```
https://github.com/DennisDeSwart/php-stanford-corenlp-adapter

```

Note: since this package contains a full version of the CoreNLP Adapter, you can use all of it's features with this package.

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

[](#installation)

This package depends on these packages:

```
http://stanfordnlp.github.io/CoreNLP/index.html#download
https://github.com/DennisDeSwart/php-stanford-corenlp-adapter
https://github.com/doctrine/dbal
https://github.com/guzzle/guzzle

```

Install procedure using the ZIP files
-------------------------------------

[](#install-procedure-using-the-zip-files)

- Install Stanford CoreNLP Server. Check the "php-stanford-corenlp-adapter" package for an installation walkthrough
- Download and unpack the files from this package.
- Copy the files to your to your webserver directory. Usually "htdocs" or "var/www".
- Run a Composer update to install the dependencies

Install as part of another project
----------------------------------

[](#install-as-part-of-another-project)

- Install Stanford CoreNLP Server. Check the "php-stanford-corenlp-adapter" package for an installation walkthrough
- Add the following lines to your main project's "composer.json" require section:

```
    {
        "require": {
            "dennis-de-swart/php-stanford-nlp-datastore": "*"
        }
    }

```

- Run a Composer update to install the dependencies

```
Copy these files from "/vendor/dennis-de-swart/php-stanford-nlp-datastore" to your webserver directory. Usually "htdocs" or "var/www".
- datastore.db
- bootstrap.php

```

- Example code for your main project:

```
    // instantiate constants and the database
    require_once __DIR__.'/bootstrap.php';

    // startup Corenlp Adapter
    $coreNLP = new CorenlpAdapter();
    $coreNLP->getOutput($yourText);
    print_r($coreNLP->serverMemory); // result from CoreNLP Adapter

    // Save result to database
    $datastore = new Datastore($db->conn);
    $datastore->storeNLP($coreNLP);

```

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

[](#requirements)

- PHP 5.6 or higher: it also works on PHP 7
- Java SE Runtime Enviroment, version 1.8
- Stanford CoreNLP Server 3.7.0
- Windows or Linux/Unix 64-bit OS, 8Gb or more memory recommended.
- Composer for PHP

```
    https://getcomposer.org/

```

SQLite Browser
--------------

[](#sqlite-browser)

If you need a SQLite browser check here:

```
http://sqlitebrowser.org/

```

Important notes
---------------

[](#important-notes)

- Starting the CoreNLP server for the first time, takes some time because it will load a large amount of data.
- After the first startup, the server will be much faster.
- In my experience the Stanford CoreNLP server runs best with 8Gb of memory or more. Start the server with "-mx8g" instead of "-mx4g".
- Also use version 3.7.0 of the server, this gives you the best and quickest results.

Example output
--------------

[](#example-output)

See

- "datastore\_result\_a.PNG"
- "datastore\_result\_b.PNG"
- "datastore\_result\_search.PNG"

and "example.db", this is how a filled database looks like

Any questions?
--------------

[](#any-questions)

Let me know. You can create an issue on GitHub. Any bugs will be fixed ASAP.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

3380d ago

Major Versions

1.0.0 → 2.1.02017-01-22

### Community

---

Top Contributors

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

---

Tags

corenlp-serverlemmanernlpstanford-corenlp-servertokenizer

### Embed Badge

![Health badge](/badges/dennis-de-swart-php-stanford-nlp-datastore/health.svg)

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

PHPackages © 2026

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