PHP code example of dennis-de-swart / php-stanford-nlp-datastore
1. Go to this page and download the library: Download dennis-de-swart/php-stanford-nlp-datastore library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dennis-de-swart / php-stanford-nlp-datastore example snippets
https://github.com/DennisDeSwart/php-stanford-corenlp-adapter
{
"ennis-de-swart/php-stanford-nlp-datastore": "*"
}
}
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
// instantiate constants and the database
w CorenlpAdapter();
$coreNLP->getOutput($yourText);
print_r($coreNLP->serverMemory); // result from CoreNLP Adapter
// Save result to database
$datastore = new Datastore($db->conn);
$datastore->storeNLP($coreNLP);