<commit_before>#!/usr/bin/perl
package main;
use v5.14;

# Adding modules in @INC
use FindBin qw($Bin);
use lib "$Bin/../lib/";
use lib "$Bin/../lib/RVM";

# Pragmas
use strict;
use warnings;

# Packages
use RVM::RVM;

#######################################################################
#                                TESTS                                #
#######################################################################

my $obj = new RVM;
say "$obj";<commit_msg>Adding things to test Cortex.pm<commit_after>#!/usr/bin/perl
package main;
use v5.14;

# Adding modules in @INC
use FindBin qw($Bin);
use lib "$Bin/../lib/";
use lib "$Bin/../lib/RVM";

# Pragmas
use strict;
use warnings;

# Packages
use Cortex;
use RVM::RVM;

#######################################################################
#                                TESTS                                #
#######################################################################

my $brain = new Cortex;
my @prog = $brain->gen_program("test.txt");

$/ = "\n"; my $i = 1;
print_prog(\@prog);

sub print_prog {
    my $aref = shift; my $i = 0;
    for my $line (@$aref) {
        print "$i: ";
        foreach my $token (@$line) {
            print "$token " if defined $token; 
        }
        print "\n"; $i++;
    }
}

say "\nRVM ", '-' x 20, "\n";
my $obj = new RVM;

$obj->{PROG} = \@prog;

say "$obj";
{'fraction_non_alphanumeric': 0.34562545191612437, 'fraction_numerical': 0.0072306579898770785, 'mean_word_length': 2.5854922279792745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '558079', 'n_tokens_mistral': 460, 'n_tokens_neox': 423, 'n_words': 116}