<commit_before>#!/usr/bin/env ruby

require_relative 'command_line/command_line_arguments.rb'
require_relative "./topology_generator.rb"
require 'colorize'

begin
    my_command_line_arguments = CommandLineArguments.new
    my_command_line_arguments.run

    raise ArgumentError, 'No arguments received' unless arguments
    [:source,:directory_concrete_builders,:output_directory, :uri_resource].each do |argument_name|
      raise ArgumentError, "It is mandatory that arguments has a #{argument_name}" unless arguments.key? argument_name
    end

    topo_gen = topologygenerator.new({
            "source" => my_command_line_arguments.source
            "directory_concrete_builders" => my_command_line_arguments.directory_concrete_builders,
            "output_directory" => my_command_line_arguments.output_directory,
            "uri_resource" => my_command_line_arguments.uri_resource
        })
    topo_gen.generate
rescue Exception => ex
  puts "#{ex.class}".red 
  puts "#{ex.message}".blue
end<commit_msg>checks are not necessary, since the commandlinearguments defines everything. TODO: Implment better errors for the createTopology<commit_after>#!/usr/bin/env ruby

require_relative 'command_line/command_line_arguments.rb'
require_relative "topologygenerator.rb"
require 'colorize'

#begin
    my_command_line_arguments = CommandLineArguments.new
    my_command_line_arguments.run

    topo_gen = Topologygenerator.new({
            "source" => my_command_line_arguments.source,
            "directory_concrete_builders" => my_command_line_arguments.directory_concrete_builders,
            "output_directory" => my_command_line_arguments.output_directory,
            "uri_resource" => my_command_line_arguments.uri_resource
        })
    topo_gen.generate
#rescue Exception => ex
#  puts "#{ex.class}".red 
#  puts "#{ex.message}".blue
#end
{'fraction_non_alphanumeric': 0.08826695371367062, 'fraction_numerical': 0.0, 'mean_word_length': 4.516320474777448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3267613', 'n_tokens_mistral': 549, 'n_tokens_neox': 541, 'n_words': 101}