<commit_before>class Mumukit::Inspection::NegatedInspection
  def must
    'must_not'
  end
end

class Mumukit::Inspection::PositiveInspection
  def must
    'must'
  end
end

module WithExpectationsTranslate

  def t_expectation_result(binding, inspection)
    inspection = Mumukit::Inspection.parse inspection
    raw t "expectation_#{inspection.type}", binding: "<strong>#{binding}</strong>", target: "<strong>#{inspection.target}</strong>", must: t_must(inspection)
  end

  def t_must(parsed)
    t("expectation_#{parsed.must}")
  end
end<commit_msg>quickfix: not crashing on unparseable expectations<commit_after>class Mumukit::Inspection::NegatedInspection
  def must
    'must_not'
  end
end

class Mumukit::Inspection::PositiveInspection
  def must
    'must'
  end
end

module WithExpectationsTranslate

  def t_expectation_result(binding, inspection)
    inspection = Mumukit::Inspection.parse inspection
    raw t "expectation_#{inspection.type}", binding: "<strong>#{binding}</strong>", target: "<strong>#{inspection.target}</strong>", must: t_must(inspection)
  rescue
    '<unknown expectation>'
  end

  def t_must(parsed)
    t("expectation_#{parsed.must}")
  end
end
{'fraction_non_alphanumeric': 0.11739864864864864, 'fraction_numerical': 0.0, 'mean_word_length': 5.54696132596685, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '4549536', 'n_tokens_mistral': 382, 'n_tokens_neox': 392, 'n_words': 81}