public class OpenNLPNERecogniser extends Object implements NERecogniser
NERecogniser
chains an array of
OpenNLPNameFinder
s for which NER models are
available in classpath.
The following models are scanned during initialization via class loader.:
Entity Type | Path |
---|---|
"ner-person.bin" | |
"ner-location.bin" | |
"ner-organization.bin" | |
"ner-time.bin" | |
"ner-date.bin" | |
"ner-percentage.bin" | |
"ner-money.bin" |
NamedEntityParser.DEFAULT_NER_IMPL
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FILE |
static Map<String,String> |
DEFAULT_MODELS |
static String |
LOCATION_FILE |
static String |
MODELS_DIR |
static String |
MONEY_FILE |
static String |
NER_DATE_MODEL |
static String |
NER_LOCATION_MODEL |
static String |
NER_MONEY_MODEL |
static String |
NER_ORGANIZATION_MODEL |
static String |
NER_PERCENT_MODEL |
static String |
NER_PERSON_MODEL |
static String |
NER_TIME_MODEL |
static String |
ORGANIZATION_FILE |
static String |
PERCENT_FILE |
static String |
PERSON_FILE |
static String |
TIME_FILE |
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME
Constructor and Description |
---|
OpenNLPNERecogniser()
Creates a default chain of Name finders using default OpenNLP recognizers
|
OpenNLPNERecogniser(Map<String,String> models)
Creates a chain of Named Entity recognisers
|
Modifier and Type | Method and Description |
---|---|
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
|
public static final String MODELS_DIR
public static final String PERSON_FILE
public static final String LOCATION_FILE
public static final String ORGANIZATION_FILE
public static final String TIME_FILE
public static final String DATE_FILE
public static final String PERCENT_FILE
public static final String MONEY_FILE
public static final String NER_PERSON_MODEL
public static final String NER_LOCATION_MODEL
public static final String NER_ORGANIZATION_MODEL
public static final String NER_TIME_MODEL
public static final String NER_DATE_MODEL
public static final String NER_PERCENT_MODEL
public static final String NER_MONEY_MODEL
public OpenNLPNERecogniser()
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.