Exemplo n.º 1
0
 <html>
  <body>
 
  <?php 
error_reporting(E_ALL);
include_once 'lib/stanford-nlp/autoload.php';
/* standford nlp autoloader inclusion */
$ner = new \StanfordNLP\NERTagger(__DIR__ . '/lib/stanford-ner-2015-04-20/classifiers/english.all.3class.distsim.crf.ser.gz', __DIR__ . '/lib/stanford-ner-2015-04-20/stanford-ner.jar');
$result = $ner->tag(explode(' ', "The Federal Reserve Bank of New York led by Timothy R. Geithner."));
echo "<h3>Log</h3>";
echo "<pre>";
var_dump($ner->getErrors());
echo "</pre>";
echo "<h3>Results</h3>";
echo "<pre>";
var_dump($result);
echo "</pre>";
?>
  </body>
</html>