You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Badger (JIRA)" <ji...@apache.org> on 2018/08/20 16:40:00 UTC
[jira] [Created] (TIKA-2713) Setting classpath for tika-server and
opennlp processor models
Badger created TIKA-2713:
----------------------------
Summary: Setting classpath for tika-server and opennlp processor models
Key: TIKA-2713
URL: https://issues.apache.org/jira/browse/TIKA-2713
Project: Tika
Issue Type: Bug
Components: server
Affects Versions: 1.18, 1.17
Reporter: Badger
I can't seem to set the classpath for the tika-server so that the opennlp models are detected correctly.
I've followed the instructions here:
[https://wiki.apache.org/tika/TikaAndNER]
I have created the following folder structure :(
tika
`-- tika-ner-resources
`-- org
`-- apache
`-- tika
`-- parser
`-- ner
`-- opennlp
|-- ner-location.bin
|-- ner-organization.bin
`-- ner-person.bin
*{{Running:}}*
{{java -classpath tika/tika-ner-resources -jar tika-server-1.18.jar --config /etc/tika-config.xml -enableUnsecureFeatures -h 0.0.0.0}}
*{{and issuing}}*
{{ curl -v -XPUT --data-binary @test.pdf [http://localhost:9998/tika] --header "Accept: text/plain" --header "Content-Type: application/pdf"}}
*results in*
INFO going to load, instantiate and bind the instance of org.apache.tika.parser.ner.opennlp.OpenNLPNERecogniser
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-location.bin using class loader
INFO LOCATION NER : Available for service ? false
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-organization.bin using class loader
INFO ORGANIZATION NER : Available for service ? false
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-date.bin using class loader
INFO DATE NER : Available for service ? false
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-money.bin using class loader
INFO MONEY NER : Available for service ? false
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-person.bin using class loader
INFO PERSON NER : Available for service ? false
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-percentage.bin using class loader
INFO PERCENT NER : Available for service ? false
WARN Couldn't find model from org/apache/tika/parser/ner/opennlp/ner-time.bin using class loader
INFO TIME NER : Available for service ? false
INFO org.apache.tika.parser.ner.opennlp.OpenNLPNERecogniser is available ? false
INFO going to load, instantiate and bind the instance of org.apache.tika.parser.ner.regex.RegexNERecogniser
INFO org.apache.tika.parser.ner.regex.RegexNERecogniser is available ? false
INFO Number of NERecognisers in chain 0
The only thing that seems to work is re-packing the jar by adding the contents of the tika/tika-ner-resources directory (i.e. org/blah/blah/*.bin). The curl command then executes without any issues.
Does anyone have any ideas ?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)