<commit_before># frozen_string_literal: true
require 'factory_girl_rails'

chunks_count = 10
max_translations_count = 5
max_comments_count = 5
users_count = 2

authorized_user = create(:user)
material = create(:material, owner: authorized_user)

users = create_list(:user, users_count)
users.unshift(authorized_user)

create_list(:chunk, chunks_count, material: material).each do |chunk|
  rand(max_translations_count).times do
    translator = users.sample
    create(:translation, chunk: chunk, translator: translator)
  end

  rand(max_comments_count).times do
    commentator = users.sample
    create(:comment, chunk: chunk, commentator: commentator)
  end
end<commit_msg>🐛  fix fakees seeder with FactoryGirl method prefixes<commit_after># frozen_string_literal: true
require 'factory_girl_rails'

chunks_count = 10
max_translations_count = 5
max_comments_count = 5
users_count = 2

authorized_user = FactoryGirl.create(:user)
material = FactoryGirl.create(:material, owner: authorized_user)

users = FactoryGirl.create_list(:user, users_count)
users.unshift(authorized_user)

create_list(:chunk, chunks_count, material: material).each do |chunk|
  rand(max_translations_count).times do
    translator = users.sample
    FactoryGirl.create(:translation, chunk: chunk, translator: translator)
  end

  rand(max_comments_count).times do
    commentator = users.sample
    FactoryGirl.create(:comment, chunk: chunk, commentator: commentator)
  end
end
{'fraction_non_alphanumeric': 0.08940852819807428, 'fraction_numerical': 0.0068775790921595595, 'mean_word_length': 6.275, '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': '2583048', 'n_tokens_mistral': 461, 'n_tokens_neox': 431, 'n_words': 106}