Class MITIENERecogniser

  • All Implemented Interfaces:

    public class MITIENERecogniser
    extends Object
    implements NERecogniser
    This class offers an implementation of NERecogniser based on trained models using state-of-the-art information extraction tools. This NER requires additional setup, due to runtime binding to MIT Information Extraction. See Tika MITIE Wiki for configuring this recogniser.
    See Also:
    • Constructor Detail

      • MITIENERecogniser

        public MITIENERecogniser()
      • MITIENERecogniser

        public MITIENERecogniser​(String modelPath)
        Creates a NERecogniser by loading model from given path
        modelPath - path to NER model file
    • Method Detail

      • isAvailable

        public boolean isAvailable()
        Description copied from interface: NERecogniser
        checks if this Named Entity recogniser is available for service
        Specified by:
        isAvailable in interface NERecogniser
        true if model was available, valid and was able to initialise the classifier. returns false when this recogniser is not available for service.
      • getEntityTypes

        public Set<String> getEntityTypes()
        Gets set of entity types recognised by this recogniser
        Specified by:
        getEntityTypes in interface NERecogniser
        set of entity classes/types
      • recognise

        public Map<String,​Set<String>> recognise​(String text)
        recognises names of entities in the text
        Specified by:
        recognise in interface NERecogniser
        text - text which possibly contains names
        map of entity type -> set of names