Package org.apache.tika.language.detect
Class LanguageHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.sax.WriteOutContentHandler
org.apache.tika.language.detect.LanguageHandler
- All Implemented Interfaces:
- ContentHandler,- DTDHandler,- EntityResolver,- ErrorHandler
SAX content handler that updates a language detector based on all the
 received character content.
- Since:
- Apache Tika 0.10
- 
Constructor SummaryConstructorsConstructorDescriptionLanguageHandler(LanguageDetector detector) LanguageHandler(LanguageWriter writer) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the language detector used by this content handler.Returns the detected language based on text handled thus far.Methods inherited from class org.apache.tika.sax.WriteOutContentHandlercharacters, ignorableWhitespaceMethods inherited from class org.apache.tika.sax.ContentHandlerDecoratorendDocument, endElement, endPrefixMapping, error, fatalError, handleException, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString, warningMethods inherited from class org.xml.sax.helpers.DefaultHandlernotationDecl, resolveEntity, unparsedEntityDeclMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandlerdeclaration
- 
Constructor Details- 
LanguageHandler- Throws:
- IOException
 
- 
LanguageHandler
- 
LanguageHandler
 
- 
- 
Method Details- 
getDetectorReturns the language detector used by this content handler. Note that the returned detector gets updated whenever new SAX events are received by this content handler.- Returns:
- language detector
 
- 
getLanguageReturns the detected language based on text handled thus far.- Returns:
- LanguageResult
 
 
-