<commit_before>#!/usr/bin/env perl6
#
use v6;

BEGIN {
  @*INC.unshift('/home/marcel/Languages/Perl6/Projects/Semi-xml/lib');
}

use Semi-xml;

# Allow switches after positionals. Pinched from an older panda version. Now
# it is possible to make the sxml file executable with the path of this
# program.
#
my @a = grep( /^ <-[-]>/, @*ARGS);
@*ARGS = (|grep( /^ '-'/, @*ARGS), |@a);

#-------------------------------------------------------------------------------
#
role sxml-role {
  has Hash $.user-configuration = { output => { } };
}

#-------------------------------------------------------------------------------
#= sxml2xml -run run-code filename.sxml
#
sub MAIN ( Str $filename, Str :$run ) {

  my $dep = process-sxml( $filename, :$run);
  if $dep.defined {
    my Array $dep-list = [$dep.split(/\s* ',' \s*/)];
    for $dep-list.list -> $dependency is copy {
      $dependency ~~ s/^\s+//;
      $dependency ~~ s/\s+$//;
      say "Processing dependency $dependency";
      my $dep = process-sxml( $dependency, :$run) if ? $dependency;
      $dep-list.push: |$dep.split(/\s* ',' \s*/) if ? $dep;<commit_msg>remove begin section<commit_after>#!/usr/bin/env perl6
#
use v6;

#BEGIN {
#  @*INC.unshift('/home/marcel/Languages/Perl6/Projects/Semi-xml/lib');
#}

use Semi-xml;

# Allow switches after positionals. Pinched from an older panda version. Now
# it is possible to make the sxml file executable with the path of this
# program.
#
my @a = grep( /^ <-[-]>/, @*ARGS);
@*ARGS = (|grep( /^ '-'/, @*ARGS), |@a);

#-------------------------------------------------------------------------------
#
role sxml-role {
  has Hash $.user-configuration = { output => { } };
}

#-------------------------------------------------------------------------------
#= sxml2xml -run run-code filename.sxml
#
sub MAIN ( Str $filename, Str :$run ) {

  my $dep = process-sxml( $filename, :$run);
  if $dep.defined {
    my Array $dep-list = [$dep.split(/\s* ',' \s*/)];
    for $dep-list.list -> $dependency is copy {
      $dependency ~~ s/^\s+//;
      $dependency ~~ s/\s+$//;
      say "Processing dependency $dependency";
      my $dep = process-sxml( $dependency, :$run) if ? $dependency;
      $dep-list.push: |$dep.split(/\s* ',' \s*/) if ? $dep;
{'fraction_non_alphanumeric': 0.3210151380231523, 'fraction_numerical': 0.003561887800534283, 'mean_word_length': 1.791304347826087, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, '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': '715695', 'n_tokens_mistral': 776, 'n_tokens_neox': 742, 'n_words': 191}