public class NLTKNERecogniser extends Object implements NERecogniser
NERecogniser based on
ne_chunk() module of NLTK. This NER requires additional setup,
due to Http requests to an endpoint server that runs NLTK.
See | Modifier and Type | Field and Description |
|---|---|
static Set<String> |
ENTITY_TYPES
some common entities identified by NLTK
|
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME| Constructor and Description |
|---|
NLTKNERecogniser() |
| Modifier and Type | Method and Description |
|---|---|
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()
NERecogniserisAvailable in interface NERecognisertrue if server endpoint is available.
returns false if server endpoint is not avaliable for service.public Set<String> getEntityTypes()
getEntityTypes in interface NERecogniserCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.