Class OpenNLPNameFinder
- java.lang.Object
- 
- org.apache.tika.parser.ner.opennlp.OpenNLPNameFinder
 
- 
- All Implemented Interfaces:
- NERecogniser
 
 public class OpenNLPNameFinder extends Object implements NERecogniser An implementation ofNERecogniserthat finds names in text using Open NLP Model. This implementation works with only one entity type. For chain this name finder instances, seeOpenNLPNERecogniser
- 
- 
Field Summary- 
Fields inherited from interface org.apache.tika.parser.ner.NERecogniserDATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME
 
- 
 - 
Constructor SummaryConstructors Constructor Description OpenNLPNameFinder(String nameType, String nerModelPath)Creates OpenNLP name finder
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Set<String>>findNames(String[] tokens)finds names from given array of tokensSet<String>getEntityTypes()gets a set of entity types whose names are recognisable by thisbooleanisAvailable()checks if this Named Entity recogniser is available for serviceMap<String,Set<String>>recognise(String text)call for name recognition action from textstatic String[]tokenize(String text)
 
- 
- 
- 
Method Detail- 
isAvailablepublic boolean isAvailable() Description copied from interface:NERecogniserchecks if this Named Entity recogniser is available for service- Specified by:
- isAvailablein interface- NERecogniser
- Returns:
- true if this recogniser is ready to recognise, false otherwise
 
 - 
getEntityTypespublic Set<String> getEntityTypes() Description copied from interface:NERecognisergets a set of entity types whose names are recognisable by this- Specified by:
- getEntityTypesin interface- NERecogniser
- Returns:
- set of entity types/classes
 
 - 
recognisepublic Map<String,Set<String>> recognise(String text) Description copied from interface:NERecognisercall for name recognition action from text- Specified by:
- recognisein interface- NERecogniser
- Parameters:
- text- text with possibly contains names
- Returns:
- map of entityType -> set of names
 
 
- 
 
-