public class GrobidNERecogniser extends java.lang.Object implements NERecogniser
Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
ENTITY_TYPES |
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME
Constructor and Description |
---|
GrobidNERecogniser() |
Modifier and Type | Method and Description |
---|---|
org.json.simple.JSONArray |
convertToJSONArray(org.json.simple.JSONObject obj,
java.lang.String key)
Converts JSON Object to JSON Array
|
org.json.simple.JSONObject |
convertToJSONObject(java.lang.String jsonString)
Parses a JSON String and converts it to a JSON Object
|
java.util.Set<java.lang.String> |
getEntityTypes()
Gets set of entity types recognised by this recogniser
|
boolean |
isAvailable()
checks if this Named Entity recogniser is available for service
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
recognise(java.lang.String text)
recognises names of entities in the text
|
public boolean isAvailable()
NERecogniser
isAvailable
in interface NERecogniser
true
if server endpoint is available.
returns false
if server endpoint is not avaliable for service.public java.util.Set<java.lang.String> getEntityTypes()
getEntityTypes
in interface NERecogniser
public org.json.simple.JSONArray convertToJSONArray(org.json.simple.JSONObject obj, java.lang.String key)
public org.json.simple.JSONObject convertToJSONObject(java.lang.String jsonString)
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> recognise(java.lang.String text)
recognise
in interface NERecogniser
text
- text which possibly contains namesCopyright © 2010 - 2020 Adobe. All Rights Reserved