indentlabs/notebook

View on GitHub
app/views/document_analyses/sentiment/_emotion_explanation.html.erb

Summary

Maintainability
Test Coverage
<%=
  case emotion.downcase
  when 'fear'
    """
      Documents with a dominant fear emotion often revolve around the fear of impending threats 
      or danger, whether enumerated explicitly or left more vague. Fear is a survival mechanism
      that is a reaction to some negative stimulus, ranging from a mild caution to an extreme 
      phobia.
    """
  when 'sadness'
    """
      Documents with a dominant sadness emotion often accompany a deep feeling of loss, mourning, 
      or disadvantage. When characters are portrayed to be quiet, less energetic, withdrawn,
      or passive, readers may infer that sadness exists.
    """
  when 'disgust'
    """
      Documents with a dominant disgust emotion are often evoked due to a juxtaposition or revulsion
      when comparing something normal to something abnormal. The disgust may intensify as the
      document progresses, expounding upon details and contrasting the abnormalities further.
    """
  when 'anger'
    """
      Documents with a dominant anger emotion are often evoked due to an emotional response to
      injustice, conflict, humiliation, negligence, or betrayal. Oftentimes this anger will lead
      to one individual attacking a target verbally or physically, but passive anger can also
      be manifested through the act of silently sulking, growing tension, or hostility.
    """
  when 'joy'
    """
      Documents with a dominant joy emotion are often layered with shades of varying levels of
      enjoyment, satisfaction, and pleasure. There is a calming sense of well-being, inner peace,
      love, safety, and contentment.
    """
  end
%>