<commit_before>#!/usr/bin/perl -w
####
#### Script to moderate global messages in AmiGO 2.
####

BEGIN {
  ## Try and find our env config file if we can't get it out of the
  ## environment.
  if( $ENV{AMIGO_CGI_ROOT_DIR} ){
    if( -f "./config.pl" ){
      require "./config.pl";
    }elsif( -f "./conf/config.pl" ){
      require "./conf/config.pl";
    }elsif( -f "../conf/config.pl" ){
      require "../conf/config.pl";
    }else{
      die "unable to find config.pl";
    }
  }
}

## Bring in necessaries.
use utf8;
use strict;
use Data::Dumper;
use Getopt::Long;
use File::Path; # old versions don't have this
use File::Find;
use File::stat;
use Time::localtime;
use File::Temp qw(tempfile);

my $verbose = '';<commit_msg>add env switch<commit_after>#!/usr/bin/perl -w
####
#### Script to moderate global messages in AmiGO 2.
####

BEGIN {
  ## Try and find our env config file if we can't get it out of the
  ## environment.
  if( ! defined($ENV{AMIGO_CGI_ROOT_DIR}) || $ENV{AMIGO_CGI_ROOT_DIR} eq '' ){
    if( -f "./config.pl" ){
      require "./config.pl";
    }elsif( -f "./conf/config.pl" ){
      require "./conf/config.pl";
    }elsif( -f "../conf/config.pl" ){
      require "../conf/config.pl";
    }else{
      die "unable to find config.pl";
    }
  }
}

## Bring in necessaries.
use utf8;
use strict;
use Data::Dumper;
use Getopt::Long;
use File::Path; # old versions don't have this
use File::Find;
use File::stat;
use Time::localtime;
use File::Temp qw(tempfile);

my $verbose = '';
{'fraction_non_alphanumeric': 0.18193891102257637, 'fraction_numerical': 0.0026560424966799467, 'mean_word_length': 2.986772486772487, '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': '7026435', 'n_tokens_mistral': 552, 'n_tokens_neox': 539, 'n_words': 162}