public class OpenNLPNameFinder extends Object implements NERecogniser
NERecogniser
that finds names in text using Open NLP Model.
This implementation works with only one entity type. For chain this name finder instances,
see OpenNLPNERecogniser
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME
Constructor and Description |
---|
OpenNLPNameFinder(String nameType,
String nerModelPath)
Creates OpenNLP name finder
|
Modifier and Type | Method and Description |
---|---|
Map<String,Set<String>> |
findNames(String[] tokens)
finds names from given array of tokens
|
Set<String> |
getEntityTypes()
gets a set of entity types whose names are recognisable by this
|
boolean |
isAvailable()
checks if this Named Entity recogniser is available for service
|
Map<String,Set<String>> |
recognise(String text)
call for name recognition action from text
|
static String[] |
tokenize(String text) |
public boolean isAvailable()
NERecogniser
isAvailable
in interface NERecogniser
public Set<String> getEntityTypes()
NERecogniser
getEntityTypes
in interface NERecogniser
public Map<String,Set<String>> recognise(String text)
NERecogniser
recognise
in interface NERecogniser
text
- text with possibly contains namesCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.