Class GrobidNERecogniser

    • Field Detail

      • ENTITY_TYPES

        public static final Set<String> ENTITY_TYPES
    • Constructor Detail

      • GrobidNERecogniser

        public GrobidNERecogniser()
    • 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 server endpoint is available. returns false if server endpoint is not avaliable for service.
      • getEntityTypes

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

        public org.json.simple.JSONArray convertToJSONArray​(org.json.simple.JSONObject obj,
                                                            String key)
        Converts JSON Object to JSON Array
        Returns:
        a JSON array
      • convertToJSONObject

        public org.json.simple.JSONObject convertToJSONObject​(String jsonString)
        Parses a JSON String and converts it to a JSON Object
        Returns:
        a JSON Object
      • recognise

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