public class SentimentAnalysisParser extends AbstractParser implements Initializable
Constructor and Description |
---|
SentimentAnalysisParser() |
Modifier and Type | Method and Description |
---|---|
void |
checkInitialization(InitializableProblemHandler handler) |
Set<MediaType> |
getSupportedTypes(ParseContext context)
Returns the types supported
|
void |
initialize(Map<String,Param> params) |
void |
parse(InputStream stream,
ContentHandler handler,
Metadata metadata,
ParseContext context)
Performs the parse
|
parse
public static final String DEF_MODEL
public void initialize(Map<String,Param> params) throws TikaConfigException
initialize
in interface Initializable
params
- params to use for initializationTikaConfigException
public void checkInitialization(InitializableProblemHandler handler) throws TikaConfigException
checkInitialization
in interface Initializable
handler
- if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigException
public Set<MediaType> getSupportedTypes(ParseContext context)
getSupportedTypes
in interface Parser
context
- the parse contextpublic void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException
parse
in interface Parser
stream
- the inputhandler
- the content handlermetadata
- the metadata passedcontext
- the context for the parserIOException
- if the document stream could not be readSAXException
- if the SAX events could not be processedTikaException
- if the document could not be parsedCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.