Download the PHP package dennis-de-swart/php-stanford-corenlp-adapter without Composer

On this page you can find all versions of the php package dennis-de-swart/php-stanford-corenlp-adapter. 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-stanford-corenlp-adapter

PHP Stanford CoreNLP adapter

Version Total Downloads Maintenance Minimum PHP Version License

PHP adapter for use with Stanford CoreNLP

Features

Requirements

Update 24th February 2018

PHP7 Type hinting removed, because it was causing issues for some users.

Update 28th January 2019

Fixed issue with PHP 7.1 upwards

Installation using ZIP files

Installation using Composer

Using the Stanford CoreNLP online API service

The adapter by default uses Stanford's online API service. This should work right after the composer update. Note that the online API is a public service. If you want to analyze large volumes of text or sensitive data, please install the Java server version.

OpenIE

OpenIE creates "subject-relation-object" tuples. This is similar (but not the same) as the "Subject-Verb-Object" concept of the English language.

Notes:

Installation / Walkthrough for Java server version

Step 1: install Java

Step 2: installing the Stanford CoreNLP 3.7.0 server

Step 3: Port for server

Default port for the Java server is port 9000. If port 9000 is not available you can change the port in the "bootstrap.php" file. Example:

Step 4: Start the CoreNLP serve from the command line.

Go to the download directory, then enter the following command:

Important note: the Stanford manual says "-mx4g", however I found that this can lead to a Java OutOfMemory error. It is also important to use a 64-bit operating system with at enough memory (8Gb or more recommended)

Step 5: Test if the server has started by surfing to it's URL

When you surf to this URL, you should see the CoreNLP GUI. If you have problems with installation you can check the manual:

Step 6: Set ONLINE_API to FALSE

In "bootstrap.php" set define('ONLINE_API' , FALSE). This tells the Adapter to use the Java version

Usage examples

Instantiate the adapter:

To process a text, call the "getOutput" method:

Note that the first time that you process a text, the server takes about 20 to 30 seconds extra to load definitions. All other calls to the server after that will be much faster. Small texts are usually processed within seconds.

The results

If successful the following properties will be available:


Diagram A: Tree With Tokens



Diagram B: The ServerMemory contains all the server data


Any questions?

Please let me know.

Credits

Some functions are forked from this "Stanford parser" package:


All versions of php-stanford-corenlp-adapter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
guzzlehttp/guzzle Version ^6.2.0
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 dennis-de-swart/php-stanford-corenlp-adapter contains the following files

Loading the files please wait ....