public class GrobidNERecogniser extends Object implements NERecogniser
Modifier and Type | Field and Description |
---|---|
static Set<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,
String key)
Converts JSON Object to JSON Array
|
org.json.simple.JSONObject |
convertToJSONObject(String jsonString)
Parses a JSON String and converts it to a JSON Object
|
Set<String> |
getEntityTypes()
Gets set of entity types recognised by this recogniser
|
boolean |
isAvailable()
checks if this Named Entity recogniser is available for service
|
Map<String,Set<String>> |
recognise(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 Set<String> getEntityTypes()
getEntityTypes
in interface NERecogniser
public org.json.simple.JSONArray convertToJSONArray(org.json.simple.JSONObject obj, String key)
public org.json.simple.JSONObject convertToJSONObject(String jsonString)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.