<commit_before>package com.github.bot.curiosone.core.analysis;

import com.github.bot.curiosone.core.nlp.Phrase;

/**
 * Handles phrasal emotion analysis.
 * Provides a single public static method to calculate the emotion of a given Phrase.
 */
public class EmotionAnalysis {

  /**
   * Private constructor.
   */
  private EmotionAnalysis() {}

  /**
   * Performs an emotion analysis of the provided Phrase.
   * @param  phrase
   *         the Phrase to be analysed.
   * @return  a String representation of the calculated emotion. Supports "sad", "happy" and "angry"
   * @see  com.github.bot.curiosone.core.nlp.Phrase
   */
  public static String getEmotion(Phrase phrase) {
    double score = TokenScorer.calculateScore(phrase.getTokens());
    if (score <= -0.5) {
      return "angry";
    }<commit_msg>fix typo javadoc EmotionAnalysis<commit_after>package com.github.bot.curiosone.core.analysis;

import com.github.bot.curiosone.core.nlp.Phrase;

/**
 * Handles phrasal emotion analysis.
 * Provides a public static method to calculate the emotion of a given Phrase.
 */
public class EmotionAnalysis {

  /**
   * Private constructor.
   */
  private EmotionAnalysis() {}

  /**
   * Performs an emotion analysis of the provided Phrase.
   * @param  phrase
   *         the Phrase to be analysed.
   * @return  a String representation of the calculated emotion. Supports "sad", "happy" and "angry"
   * @see  com.github.bot.curiosone.core.nlp.Phrase
   */
  public static String getEmotion(Phrase phrase) {
    double score = TokenScorer.calculateScore(phrase.getTokens());
    if (score <= -0.5) {
      return "angry";
    }
{'fraction_non_alphanumeric': 0.10757946210268948, 'fraction_numerical': 0.0024449877750611247, 'mean_word_length': 3.2082262210796917, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3837234', 'n_tokens_mistral': 519, 'n_tokens_neox': 503, 'n_words': 146}