<commit_before>class PostSearcher
  def initialize
    @posts = Groonga['Posts']
  end

  def related_post_ids(post, limit: 5)
    related_posts = @posts.select do |record|
      conditions = (record.index('Words.Posts_title').similar_search(post.title))
      conditions |= (record.index('Words.Posts_content').similar_search(post.body))
      post.credits.each do |credit|
        conditions |= (record.participant._key =~ credit.participant_id)
      end
      if post.category
        conditions |= (record.category._key == post.category.id)
      end<commit_msg>Fix a typo...<commit_after>class PostSearcher
  def initialize
    @posts = Groonga['Posts']
  end

  def related_post_ids(post, limit: 5)
    related_posts = @posts.select do |record|
      conditions = (record.index('Words.Posts_title').similar_search(post.title))
      conditions |= (record.index('Words.Posts_content').similar_search(post.body))
      post.credits.each do |credit|
        conditions |= (record.participants._key =~ credit.participant_id)
      end
      if post.category
        conditions |= (record.category._key == post.category.id)
      end
{'fraction_non_alphanumeric': 0.12422907488986784, 'fraction_numerical': 0.001762114537444934, 'mean_word_length': 3.4375, 'pattern_counts': {'":': 0, '<': 3, '<?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': '897124', 'n_tokens_mistral': 361, 'n_tokens_neox': 338, 'n_words': 65}