gramener / gramex-nlg

Natural Language Generation for Gramex applications.
Other
24 stars 24 forks source link

Sentiment analysis #50

Open jaidevd opened 4 years ago

jaidevd commented 4 years ago

Any variable in a narrative can have an optional sentiment. For example:

{% set trend = 'increased' if x > 0 else 'decreased' %}
Sales have {{ trend }}.

Here, the variable {{ trend }} should be annotated with a sentiment, which may be optionally used for generating HTML annotations on the generated template, among other things.