<% modifier = case @analysis.sentiment_score.abs * 100 when 0..25 'somewhat' when 26..50 'mostly' when 51..100 'very' else 'generally' end %> This document expresses a <%= modifier %> <%= @analysis.sentiment_label %> sentiment throughout.
The emotion's intensity is scored on a scale from 1 to 100, where 100 is most intense.
Document relevance score: <%= entity.relevance.present? ? (entity.relevance * 100).round(1) : 'Calculating...' %>%
Character | Dominant emotion | Recessive emotion |
---|---|---|
<%= character.text %> |
<%= character.dominant_emotion.first.first.to_s.titleize %>
(<%= (character.dominant_emotion.first.second * 100).round %>%)
|
<%= character.recessive_emotion.first.first.to_s.titleize %>
(<%= (character.recessive_emotion.first.second * 100).round %>%)
|