This project has retired. For details please refer to its Attic page.
Apache Stanbol - The OpenNLP Custom NER Model Extraction Engine

The OpenNLP Custom NER Model Extraction Engine

This engine allows the configuration of custom Apache OpenNLP NameFinder models for NER of plain text content.

Example Result

This engine adds fise:TextAnnotation for the processed plain text to the metadata of the content item. The following code listing shows an DNA type Named Entity detected based on a OpenNLP NameFinder model trained based on the BioNLP2004 dataset:

    "@subject": "urn:enhancement-0e31eb01-23c5-82b5-1372-5c5606c09960",
    "@type": [
    "confidence": 0.40148407,
    "creator": "org.apache.stanbol.enhancer.engines.opennlp.impl.CustomNERModelEnhancementEngine",
    "start": 228,
    "end": 242,
    "extracted-from": "urn:content-item-sha1-84a30aeeb073be543f7c54266e232aae572efac0",
    "selected-text": {
        "@language": "en",
        "@literal": "HIV-2 enhancer"
    "selection-context": {
        "@language": "en",
        "@literal": "activation of the HIV-2 enhancer in monocytes and T cells"
    "type": ""


The usage of this Engine requires to create a service configuration. Configurations require at least a single NameFinderModel name to be configured.


The following figure provides a visual representation of an engine configuration configured for all NamedEntity types supported by the BioNLP2004 dataset.

'CustomNerModelEngine Configuration'

The same configuration can be also provided as OSGI configuration file with the name 'org.apache.stanbol.enhancer.engines.opennlp.impl.CustomNERModelEnhancementEngine-ehealthner.config' and the contents:"ehealth-ner"
stanbol.engines.opennlp-ner.typeMappings=["DNA\ >\","RNA\ >\","protein\ >\","cell_type\ >\","cell_line\ >\"]

NOTE: that the '.config' format requires spaces to be escaped with '\'