<commit_before># encoding: utf-8

require 'ostruct'
require 'csv'

require 'flextures/flextures_base_config'
require 'flextures/flextures_extension_modules'
require 'flextures/flextures_factory'

module Flextures
  LOAD_DIR = Config.fixture_load_directory
  DUMP_DIR = Config.fixture_dump_directory

  # テーブルモデルの作成
  def self.create_model table_name
    # Factoryにオプションで指定があった時
    a = ->{
      f = Factory::FACTORIES[table_name.to_sym]
      f && f[:model]
    }
    # テーブル名からモデル名が推測できるとき
    b = ->{
      begin
        table_name.singularize.camelize.constantize
      rescue => e
        nil
      end
    }
    # モデル名推測不可能なとき
    c = ->{ <commit_msg>コード調整<commit_after># encoding: utf-8

require 'ostruct'
require 'csv'

require "flextures/flextures_base_config"
require "flextures/flextures_extension_modules"
require "flextures/flextures_factory"

module Flextures
  LOAD_DIR = Config.fixture_load_directory
  DUMP_DIR = Config.fixture_dump_directory

  # テーブルモデルの作成
  def self.create_model table_name
    # Factoryにオプションで指定があった時
    a = ->{
      f = Factory::FACTORIES[table_name.to_sym]
      f && f[:model]
    }
    # テーブル名からモデル名が推測できるとき
    b = ->{
      begin
        table_name.singularize.camelize.constantize
      rescue => e
        nil
      end
    }
    # モデル名推測不可能なとき
    c = ->{ 
{'fraction_non_alphanumeric': 0.08895705521472393, 'fraction_numerical': 0.0015337423312883436, 'mean_word_length': 3.0654205607476634, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '486666', 'n_tokens_mistral': 544, 'n_tokens_neox': 524, 'n_words': 78}