Class OpenNLPNERecogniser

    • Constructor Detail

      • OpenNLPNERecogniser

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

        public OpenNLPNERecogniser​(Map<String,​String> models)
        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 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
        Returns:
        true if this recogniser is ready to recognise, false otherwise
      • getEntityTypes

        public Set<String> getEntityTypes()
        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)
        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