<commit_before><commit_msg>Started processing<commit_after>class Processing < ActiveRecord::Base
  has_one :repository, foreign_key: 'repository_id', class_name: 'Repository'

  def initialize(date, process_state)
    @date = date
    @process_state = set_state(process_state)
  end

  def set_state(process_state)
    if state == 'ERROR' then raise NotImplementedError
    process_state
  end

  def has_processing(repository)
    repository.persisted?
  end

  def has_ready_processing(repository)
    has_processing(repository) && @process_state == 'READY'
  end
end
{'fraction_non_alphanumeric': 0.0843585237258348, 'fraction_numerical': 0.0, 'mean_word_length': 5.195652173913044, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1039317', 'n_tokens_mistral': 175, 'n_tokens_neox': 169, 'n_words': 39}