SentimentConfig
Configuration for Tika sentiment analysis of document content.
Notes
Configuration for Tika's sentiment analysis parser, which scores document content as expressing positive or negative sentiment using a pre-trained OpenNLP model.
Sentiment analysis is disabled by default. Unlike most Tika parsers, this one downloads its model from the network the moment it initializes, regardless of whether any document ever needs sentiment analysis. Left enabled without a reachable model URL, this can slow down or fail startup.
Usage
- YAML
- JSON
- XML
enabled: false
modelPath: string
{
"enabled": false,
"modelPath": "string"
}
<sentiment>
<enabled>false</enabled>
<modelPath>string</modelPath>
</sentiment>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
enabled | boolean | No | false |
modelPath | string | No | https://raw.githubusercontent.com/USCDataScience/SentimentAnalysisParser/master/sentiment-models/src/main/resources/edu/usc/irds/sentiment/en-netflix-sentiment.bin |
Property Details
enabled
Whether to enable sentiment analysis. Default is false. Enabling it causes the model at modelPath to be fetched when the parser initializes.
modelPath
URL or file path to the sentiment analysis model. Defaults to a Tika-hosted model on GitHub. Only relevant when enabled is true.