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 OpenNLPNERecogniserDATE, 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()
NERecogniserisAvailable in interface NERecogniserpublic Set<String> getEntityTypes()
NERecognisergetEntityTypes in interface NERecogniserpublic Map<String,Set<String>> recognise(String text)
NERecogniserrecognise in interface NERecognisertext - text with possibly contains namesCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.