Class OpenNLPNERecogniser

java.lang.Object
org.apache.tika.parser.ner.opennlp.OpenNLPNERecogniser
All Implemented Interfaces:
NERecogniser

@Deprecated(since="2026-04-30") public class OpenNLPNERecogniser extends Object implements NERecogniser
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
This implementation of NERecogniser chains an array of OpenNLPNameFinders for which NER models are available in classpath. The following models are scanned during initialization via class loader.:
Entity TypePath
"PERSON" "ner-person.bin"
"LOCATION""ner-location.bin"
"ORGANIZATION""ner-organization.bin"
"TIME""ner-time.bin"
"DATE""ner-date.bin"
"PERCENT""ner-percentage.bin"
"MONEY""ner-money.bin"
See Also:
  • Field Details

    • MODELS_DIR

      public static final String MODELS_DIR
      Deprecated.
    • PERSON_FILE

      public static final String PERSON_FILE
      Deprecated.
      See Also:
    • LOCATION_FILE

      public static final String LOCATION_FILE
      Deprecated.
      See Also:
    • ORGANIZATION_FILE

      public static final String ORGANIZATION_FILE
      Deprecated.
      See Also:
    • TIME_FILE

      public static final String TIME_FILE
      Deprecated.
      See Also:
    • DATE_FILE

      public static final String DATE_FILE
      Deprecated.
      See Also:
    • PERCENT_FILE

      public static final String PERCENT_FILE
      Deprecated.
      See Also:
    • MONEY_FILE

      public static final String MONEY_FILE
      Deprecated.
      See Also:
    • NER_PERSON_MODEL

      public static final String NER_PERSON_MODEL
      Deprecated.
    • NER_LOCATION_MODEL

      public static final String NER_LOCATION_MODEL
      Deprecated.
    • NER_ORGANIZATION_MODEL

      public static final String NER_ORGANIZATION_MODEL
      Deprecated.
    • NER_TIME_MODEL

      public static final String NER_TIME_MODEL
      Deprecated.
    • NER_DATE_MODEL

      public static final String NER_DATE_MODEL
      Deprecated.
    • NER_PERCENT_MODEL

      public static final String NER_PERCENT_MODEL
      Deprecated.
    • NER_MONEY_MODEL

      public static final String NER_MONEY_MODEL
      Deprecated.
    • DEFAULT_MODELS

      public static final Map<String,String> DEFAULT_MODELS
      Deprecated.
  • Constructor Details

    • OpenNLPNERecogniser

      public OpenNLPNERecogniser()
      Deprecated.
      Creates a default chain of Name finders using default OpenNLP recognizers
    • OpenNLPNERecogniser

      public OpenNLPNERecogniser(Map<String,String> models)
      Deprecated.
      Creates a chain of Named Entity recognisers
      Parameters:
      models - map of entityType -> model path NOTE: the model path should be known to class loader.
  • Method Details

    • isAvailable

      public boolean isAvailable()
      Deprecated.
      Description copied from interface: NERecogniser
      checks if this Named Entity recogniser is available for service
      Specified by:
      isAvailable in interface NERecogniser
      Returns:
      true if this recogniser is ready to recognise, false otherwise
    • getEntityTypes

      public Set<String> getEntityTypes()
      Deprecated.
      Description copied from interface: NERecogniser
      gets a set of entity types whose names are recognisable by this
      Specified by:
      getEntityTypes in interface NERecogniser
      Returns:
      set of entity types/classes
    • recognise

      public Map<String,Set<String>> recognise(String text)
      Deprecated.
      Description copied from interface: NERecogniser
      call for name recognition action from text
      Specified by:
      recognise in interface NERecogniser
      Parameters:
      text - text with possibly contains names
      Returns:
      map of entityType -> set of names