<commit_before># encoding: utf-8

class Myaso::TokyoCabinet::Words < Myaso::Base::Adapter
  include TokyoCabinet

  def find id
    base.storages[:words][id]
  end

  def set id, rule
    base.storages[:words][id] = rule
  end

  def delete id
    base.storages[:words].delete id
  end
end<commit_msg>Add the words helper to Myaso::TokyoCabinet::Words<commit_after># encoding: utf-8

class Myaso::TokyoCabinet::Words < Myaso::Base::Adapter
  include TokyoCabinet

  def find id
    words[id]
  end

  def set id, rule
    words[id] = rule
  end

  def delete id
    words.delete id
  end

  protected
    def words
      @words ||= base.storages[:words]
    end
end
{'fraction_non_alphanumeric': 0.10225563909774436, 'fraction_numerical': 0.0030075187969924814, 'mean_word_length': 3.324675324675325, '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': '3691534', 'n_tokens_mistral': 250, 'n_tokens_neox': 239, 'n_words': 64}