PHP-Stanford-NLP
PHP-Stanford-NLP copied to clipboard
Empty Array Returned
Hi, I am trying NERTagger and for that require_once 'StanfordNLP/Base.php'; require_once 'StanfordNLP/StanfordTagger.php'; require_once 'StanfordNLP/POSTagger.php'; require_once 'StanfordNLP/Exception.php'; require_once 'StanfordNLP/NERTagger.php'; $pos = new \StanfordNLP\NERTagger( '/var/www/html/api/stanford-ner-2015-12-09/classifiers/english.all.3class.distsim.crf.ser.gz', '/var/www/html/api/stanford-ner-2015-12-09/stanford-ner.jar' ); include('autoload.php'); $result = $pos->tag(explode(' ', "The Federal Reserve Bank of New York led by Timothy R. Geithner.")); var_dump($result); i wrote this much code but its returning me an empty array.
please help me with this issue.
Thanks the issue has been resolved by upgrading java version to "1.8.0_101"...........but now m getting Error: Could not find or load main class edu.stanford.nlp.ie.crf.CRFClassifier Can anybody plz help me with this issue?
saddy206: Try to use version of StanfordNLP 3.5.2 ( 2015-04-20)
saddy206: How did you solve the empty array issue bc I have that problem!
You need to specify the full path to your models and jar files. Using a relative directory wont work.
this should be an error not silent fail
full path still does not work - empty array