Package org.apache.tika.parser.ner.nltk
Class NLTKNERecogniser
- java.lang.Object
 - 
- org.apache.tika.parser.ner.nltk.NLTKNERecogniser
 
 
- 
- All Implemented Interfaces:
 NERecogniser
public class NLTKNERecogniser extends java.lang.Object implements NERecogniser
This class offers an implementation ofNERecogniserbased on ne_chunk() module of NLTK. This NER requires additional setup, due to Http requests to an endpoint server that runs NLTK. See 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.util.Set<java.lang.String>ENTITY_TYPESsome common entities identified by NLTK- 
Fields inherited from interface org.apache.tika.parser.ner.NERecogniser
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME 
 - 
 
- 
Constructor Summary
Constructors Constructor Description NLTKNERecogniser() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>getEntityTypes()Gets set of entity types recognised by this recogniserbooleanisAvailable()checks if this Named Entity recogniser is available for servicejava.util.Map<java.lang.String,java.util.Set<java.lang.String>>recognise(java.lang.String text)recognises names of entities in the text 
 - 
 
- 
- 
Method Detail
- 
isAvailable
public boolean isAvailable()
Description copied from interface:NERecogniserchecks if this Named Entity recogniser is available for service- Specified by:
 isAvailablein interfaceNERecogniser- Returns:
 trueif server endpoint is available. returnsfalseif server endpoint is not avaliable for service.
 
- 
getEntityTypes
public java.util.Set<java.lang.String> getEntityTypes()
Gets set of entity types recognised by this recogniser- Specified by:
 getEntityTypesin interfaceNERecogniser- Returns:
 - set of entity classes/types
 
 
- 
recognise
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> recognise(java.lang.String text)
recognises names of entities in the text- Specified by:
 recognisein interfaceNERecogniser- Parameters:
 text- text which possibly contains names- Returns:
 - map of entity type -> set of names
 
 
 - 
 
 -