Hi Alberto
This kind of Exception is only created if the model file is present,
but it can not be accessed/loaded/instantiated. Can you please provide
the full stack trace including the "caused by" exceptions.
I had a similar problem once and it was because some proxy cause to
send html instead of the model files what caused the downloaded models
to be corrupted. Typically you can detect this by the file size. The
data/opennlp/ner/en/src/main/resources/org/apache/stanbol/data/opennlp/en-ner-person.bin
is "5.207.953 bytes" on my machine. You can also try to extract them
as they are normal JAR files.
In case you encounter corrupted files you will need to manually delete
the models from
{stanbol-source-code}/data/opennlp/ner/{lang}/src/main/resources
{stanbol-source-code}/data/opennlp/lang/{lang}/src/main/resources
Note that {lang} are the different language codes
After that the models will be re-downloaded by the next build. BTW:
OpenNLP models are currently downloaded for this mirror [1] if you
want to check if you can reach it from your host.
To install the re-build bundles to your Stanbol instance you can call
mvn clean install -PinstallBundle
-Dsling.url=http://localhost:8080/system/console
within
{stanbol-source-code}/data/opennlp/ner/en
to refresh the english NER models that caused the reported error.
If file corruption is not the reason for your issue please provide the
stack trace of the encounter error.
best
Rupert
[1] http://dev.iks-project.eu/downloads/opennlp/models-1.5/
On Fri, Jun 29, 2012 at 12:12 PM, Alberto Musetti <[email protected]> wrote:
> Hi all,
>
> I have a problem with my Stanbol instance:
> when i post an english text to the enhancer, it fails the execution on ner
> engine with this error:
>
> org.apache.stanbol.enhancer.servicesapi.ChainException: Enhancement Chain
> failed because of required Engine 'ner' failed with Message: Unable to
> process ContentItem
> '<urn:content-item-sha1-a274b8c641d15f7e45f834630d667ab64096b122>' with
> Enhancement Engine 'ner' because the engine was unable to process the content
> (Engine class:
> org.apache.stanbol.enhancer.engines.opennlp.impl.NamedEntityExtractionEnhancementEngine)(Reason:
> 'NEREngineCore' failed to process content item
> 'urn:content-item-sha1-a274b8c641d15f7e45f834630d667ab64096b122' with type
> 'text/plain': java.lang.IllegalStateException: Unable to create
> TokenNameFinderModel for en-ner-person.bin!)! at
> org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl.enhanceContent(EventJobManagerImpl.java:151)
>
> My ner configuration is:
> Name: ner
> Language : <empty>
> Default Language: <empty>
> Ranking: 0
>
> If i post an italian or french text there isn't any problems.
>
> Do you know this problem?
>
> Bests,
> Alberto
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen