Timeseries indicators
Timeseries indicators
Indicators are quantitative evaluation of opinion, sentiment or theme in order to obtain insightful metrics on entities which can be brands, companies or products.
Categories of indicators
Emotion indicators have been deprecated and are no longer available through the TextReveal® API
TextReveal® API provides different indicators that fall into four categories:
- Affective indicators which include sentiments
and emotions. Each sentence has 3 classes for feelingand 7 classes for emotion.- Available classes for sentiments are : positive, negative, neutral.
Available classes for emotions are: joy, anticipation, trust, anger, fear, surprise , sadness.
- Relevancy indicators which currently output similarity scores of text to entities.
- Available class for relevancy is: similarity.
- Concept/risks indicators which are exposure scores on dynamic user-defined concepts. Such concepts can be on environment, governance or social.
- Volume indicators which output the counts for different granularity such as the document or the sentence.
List of timeseries indicators
The timeseries indicators falls in three categories: entity-scope, document-scope and concept-scope.
Entity-scope
entity_{operator}_{sentiment}_score
- Evaluate sentiment towards the entity of interest in the sentences mentioning the entity of interest
- Formula:
- Select sentences mentioning the entity of interest in all matched document of the aggregation period
- Aggregate the selected sentences sentiment indicators with the selected aggregation function
entity_volume_sentence
- Evaluate the volume of sentences mentioning the entity of interest
- Formula:
- Count of the number of sentences where the entity of interest is matched over the aggregation period
entity_{operator}_polarity
- Evaluate sentiment level towards the entity of interest in the sentences mentioning the entity of interest
- The polarity is calculated only for the sentiment and makes it possible to give the trend of the sentiment by removing the neutral from the calculation. The polarity score varies between -1 and 1. A sentence with a score close to -1 will be rather negative
- Formula:
- Select sentences mentioning the entity of interest in all matched document of the aggregation period
- Aggregate the selected sentences polarity indicators with the selected aggregation function
entity_{operator}_polarity_exp
- Same than the indicator above although the score here can vary between 0 and 1
Document-scope
{operator}_{sentiment}_score
- Evaluate sentiment towards the entity of interest in all sentences composing the document where the entity of interest is matched
- Formula:
- Select all sentences of the matched documents over the aggregation period
- Aggregate the selected sentences sentiment indicators with the selected aggregation function
{operator}_polarity
- Evaluate the average sentiment level of all documents where the entity of interest is matched for the aggregation time period.
- Formula:
- Select all sentences of the matched documents over the aggregation period
- Aggregate the selected sentences' polarity indicators with the selected aggregation function
{operator}_polarity_exp
- Same than the indicator above although the score here can vary between 0 and 1
volume_sentence
- Evaluate the volume of sentences of all the documents matching the entity of interest
- Formula:
- Count the number of sentences of all matched documents for the aggregation period
volume_document
- Evaluate the volume of documents matching the entity of interest
- Formula:
- Count the number of documents matching the entity of interest for the aggregation period
Concept-scope
{concept}_sentiment_polarity
- Evaluate the average sentiment level of all documents where the entity of interest and the concept are matched for the aggregation time period
- Formula:
- Select all documents where there is a Concept match AND an Entity match
- Average the polarity of all sentences of each document of this document set (document-level polarity indicators)
- Average the selected document-level indicators
{concept}_volume_document
- Count the number of documents matching the concept for the aggregation period
{concept}_volume_sentence
- Count the number of sentences of documents matching the concept for the aggregation period
concepts_keywords_count
- Represents the count of keywords matched per concepts in the document for the aggregation period.
For example, for the concept CONCEPT with a keyword KEYWORD, if two documents match this concept and this keyword is found 2 times in the first document and 3 times in the second, the indicator will be equal to 5.
This is represented with this format:{"CONCEPT": {"KEYWORD": 5}}
If a concept or a keyword is not matched, it won't be present in the indicator. - This indicator is only enabled if concepts are present in the analysis and is disabled when
volume_only
is enabled.
How to generate indicators
Indicators are obtained following an analysis run on TextReveal® API
/analyze/dataset
and /analyze/tql
.
Once the analysis is completed,
you can generate timeseries using the /analyze/timeseries/{id}
route with the id of your instance.
This route will return you the hash value of your newly computed timeseries.
By using the route /analyze/{id}/timeseries/{hash}/download
,
you can retrieve
and download the dataset indicators
that have been calculated for the given instance based on the property value of your payload.
By default, indicators are calculated at the sentence level and can be aggregated daily,
hourly or on a minute basis thanks to the timeseries route.
Matching occurs in the document and entity scope.
Textreveal® process to generate timeseries indicators
Example
[
{
"concept_sentiment_polarity": 0.147529,
"entity": "apple",
"entity_max_anger": 0.0,
"entity_max_anticipation": 0.0,
"entity_max_fear": 0.0,
"entity_max_joy": 0.0,
"entity_max_negative": 0.9998697,
"entity_max_neutral": 0.9679948,
"entity_max_polarity": 0.9998068,
"entity_max_polarity_exp": 0.73058915,
"entity_max_positive": 0.9977102,
"entity_max_sadness": 0.0,
"entity_max_surprise": 0.0,
"entity_max_trust": 0.0,
"entity_mean_anger": 0.0,
"entity_mean_anticipation": 0.0,
"entity_mean_fear": 0.0,
"entity_mean_joy": 0.0,
"entity_mean_negative": 0.28851792,
"entity_mean_neutral": 0.32175303,
"entity_mean_polarity": 0.19259128,
"entity_mean_polarity_exp": 0.52477163,
"entity_mean_positive": 0.38972905,
"entity_mean_sadness": 0.0,
"entity_mean_surprise": 0.0,
"entity_mean_trust": 0.0,
"entity_median_anger": 0.0,
"entity_median_anticipation": 0.0,
"entity_median_fear": 0.0,
"entity_median_joy": 0.0,
"entity_median_negative": 0.21405028,
"entity_median_neutral": 0.2941478,
"entity_median_polarity": 0.27354315,
"entity_median_polarity_exp": 0.5348652,
"entity_median_positive": 0.35080644,
"entity_median_sadness": 0.0,
"entity_median_surprise": 0.0,
"entity_median_trust": 0.0,
"entity_min_anger": 0.0,
"entity_min_anticipation": 0.0,
"entity_min_fear": 0.0,
"entity_min_joy": 0.0,
"entity_min_negative": 0.00009640515,
"entity_min_neutral": 0.00007480668,
"entity_min_polarity": -0.99988925,
"entity_min_polarity_exp": 0.26897794,
"entity_min_positive": 0.000055367167,
"entity_min_sadness": 0.0,
"entity_min_surprise": 0.0,
"entity_min_trust": 0.0,
"entity_volume_sentence": 2,
"extract_day": "2019-01-31",
"extract_hour": 2,
"extract_minute": 48,
"language": "english",
"max_anger": 0.0,
"max_anticipation": 0.0,
"max_fear": 0.0,
"max_joy": 0.0,
"max_negative": 0.9998697,
"max_neutral": 0.97831124,
"max_polarity": 0.9998563,
"max_polarity_exp": 0.7309262,
"max_positive": 0.9993987,
"max_sadness": 0.0,
"max_similarity": 0.0,
"max_surprise": 0.0,
"max_trust": 0.0,
"mean_anger": 0.0,
"mean_anticipation": 0.0,
"mean_fear": 0.0,
"mean_joy": 0.0,
"mean_negative": 0.2914804,
"mean_neutral": 0.22759011,
"mean_polarity": 0.26147643,
"mean_polarity_exp": 0.5457621,
"mean_positive": 0.4809295,
"mean_sadness": 0.0,
"mean_similarity": 0.0,
"mean_surprise": 0.0,
"mean_trust": 0.0,
"median_anger": 0.0,
"median_anticipation": 0.0,
"median_fear": 0.0,
"median_joy": 0.0,
"median_negative": 0.23828124,
"median_neutral": 0.19018553,
"median_polarity": 0.3217773,
"median_polarity_exp": 0.5518798,
"median_positive": 0.45312497,
"median_sadness": 0.0,
"median_similarity": 0.0,
"median_surprise": 0.0,
"median_trust": 0.0,
"min_anger": 0.0,
"min_anticipation": 0.0,
"min_fear": 0.0,
"min_joy": 0.0,
"min_negative": 0.000071823655,
"min_neutral": 0.000014854676,
"min_polarity": -0.99988925,
"min_polarity_exp": 0.26897794,
"min_positive": 0.000055367167,
"min_sadness": 0.0,
"min_similarity": 0.0,
"min_surprise": 0.0,
"min_trust": 0.0,
"volume_document": 5261,
"volume_document_{concept}": 2,
"volume_sentence": 159624,
"volume_sentence_{concept}": 2,
"concepts_keywords_count": {
"{concept}": {
"{keyword}": 5
}
}
}
]