public class MITIENERecogniser extends java.lang.Object implements NERecogniser
NERecogniser
based on
trained models using state-of-the-art information extraction tools. This NER requires additional setup,
due to runtime binding to MIT Information Extraction.
See
Tika MITIE Wiki for configuring this recogniser.NERecogniser
Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
ENTITY_TYPES |
static java.lang.String |
MODEL_PROP_NAME |
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME
Constructor and Description |
---|
MITIENERecogniser() |
MITIENERecogniser(java.lang.String modelPath)
Creates a NERecogniser by loading model from given path
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getEntityTypes()
Gets set of entity types recognised by this recogniser
|
boolean |
isAvailable()
checks if this Named Entity recogniser is available for service
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
recognise(java.lang.String text)
recognises names of entities in the text
|
public static final java.lang.String MODEL_PROP_NAME
public static final java.util.Set<java.lang.String> ENTITY_TYPES
public MITIENERecogniser()
public MITIENERecogniser(java.lang.String modelPath)
modelPath
- path to NER model filepublic boolean isAvailable()
NERecogniser
isAvailable
in interface NERecogniser
true
if model was available, valid and was able to initialise the classifier.
returns false
when this recogniser is not available for service.public java.util.Set<java.lang.String> getEntityTypes()
getEntityTypes
in interface NERecogniser
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> recognise(java.lang.String text)
recognise
in interface NERecogniser
text
- text which possibly contains namesCopyright © 2010 - 2020 Adobe. All Rights Reserved