<commit_before>#!/bin/sh

# a simple script to drive the generation of synthetic datasets


# Command Line Options:
#   -ntrans number_of_transactions_in_000s (default: 1000)
#   -tlen avg_items_per_transaction (default: 10)
#   -nitems number_of_different_items_in_000s) (default: 100)
# 
#   -npats number_of_patterns (default: 10000)
#   -patlen avg_length_of_maximal_pattern (default: 4)
#   -corr correlation_between_patterns (default: 0.25)
#   -conf avg_confidence_in_a_rule (default: 0.75)
# 
#   -fname <filename> (write to filename.data and filename.pat)
#   -ascii (default: False)
#   -randseed # (reset seed used generate to x-acts; must be negative)
#   -version (to print out version info)

L_TLEN="10"                    # T
L_NTRANS="20"               # D
L_NITEMS="1"                   # N

NPATS=2000                     # L 
PATLEN=8                      # I
CORR=0.25
CONF=0.75
ASCII=
RANDSEED=
#RANDSEED=-123456789

OUTPATH="."
#--------------------------------------------------------------------

for NTRANS in ${L_NTRANS}; do 
  for TLEN in ${L_TLEN}; do
    for NITEMS in ${L_NITEMS}; do

      FNAME="$OUTPATH/data_${NTRANS}k_t${TLEN}_p${PATLEN}_l${NPATS}_n${NITEMS}k"
      OPT="-ntrans ${NTRANS} -tlen ${TLEN} -nitems ${NITEMS} -npats ${NPATS}"
      OPT="${OPT} -patlen ${PATLEN} -corr ${CORR} -conf ${CONF}"
      OPT="${OPT} -fname ${FNAME} ${ASCII}"

      comm="./gen lit $OPT"

      echo $comm
      $comm

    done
  done
done

<commit_msg>We usually want stuff in ASCII, so set it in run.sh, which also serves as example.<commit_after>#!/bin/sh

# a simple script to drive the generation of synthetic datasets


# Command Line Options:
#   -ntrans number_of_transactions_in_000s (default: 1000)
#   -tlen avg_items_per_transaction (default: 10)
#   -nitems number_of_different_items_in_000s) (default: 100)
# 
#   -npats number_of_patterns (default: 10000)
#   -patlen avg_length_of_maximal_pattern (default: 4)
#   -corr correlation_between_patterns (default: 0.25)
#   -conf avg_confidence_in_a_rule (default: 0.75)
# 
#   -fname <filename> (write to filename.data and filename.pat)
#   -ascii (default: False)
#   -randseed # (reset seed used generate to x-acts; must be negative)
#   -version (to print out version info)

L_TLEN="10"                    # T
L_NTRANS="20"               # D
L_NITEMS="1"                   # N

NPATS=2000                     # L 
PATLEN=8                      # I
CORR=0.25
CONF=0.75
ASCII="-ascii"
RANDSEED=
#RANDSEED=-123456789

OUTPATH="."
#--------------------------------------------------------------------

for NTRANS in ${L_NTRANS}; do 
  for TLEN in ${L_TLEN}; do
    for NITEMS in ${L_NITEMS}; do

      FNAME="$OUTPATH/data_${NTRANS}k_t${TLEN}_p${PATLEN}_l${NPATS}_n${NITEMS}k"
      OPT="-ntrans ${NTRANS} -tlen ${TLEN} -nitems ${NITEMS} -npats ${NPATS}"
      OPT="${OPT} -patlen ${PATLEN} -corr ${CORR} -conf ${CONF}"
      OPT="${OPT} -fname ${FNAME} ${ASCII}"

      comm="./gen lit $OPT"

      echo $comm
      $comm

    done
  done
done

{'fraction_non_alphanumeric': 0.17524752475247524, 'fraction_numerical': 0.034323432343234324, 'mean_word_length': 2.4132882882882885, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6006515', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1074, 'n_words': 271}