<commit_before>class Word < ActiveRecord::Base
  belongs_to :language

  def translation
    word_name = self.word
    lang_from = self.language.language_code
    begin
      translate_hash = GoogleTranslate.new.translate(lang_from, "en", word_name)
      translations = translate_hash[1][0][1]
      return_string = translations.join("<br>")
    rescue
      begin
        return_string = translate_hash[0][0][0]
      rescue
        "N/A"
      end
    end
    
    return_string ||= "translation not found"
  end

end<commit_msg>finagle to deploy<commit_after>class Word < ActiveRecord::Base
  belongs_to :language

  def translation
    word_name = self.word
    lang_from = self.language.language_code
    begin
      translate_hash = GoogleTranslate.new.translate(lang_from, "en", word_name)

      puts translate_hash

      translations = translate_hash[1][0][1]
      return_string = translations.join("<br>")
    rescue
      begin
        return_string = translate_hash[0][0][0]
      rescue
        return_string = "N/A"
      end
    end
    
    return_string ||= "translation not found"
  end

end
{'fraction_non_alphanumeric': 0.09262589928057553, 'fraction_numerical': 0.01079136690647482, 'mean_word_length': 2.85121107266436, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '721017', 'n_tokens_mistral': 342, 'n_tokens_neox': 344, 'n_words': 72}