<commit_before>#!/usr/bin/python3
import os
from LanguageDepotAnalyze import Runner

# config file is specified, then used for the program!
cfgName = 'config.json'
dataPath = '../data'
runner = Runner(cfgName, dataPath)
runner.run()<commit_msg>Make runAnalysis accept a data folder on the command line<commit_after>#!/usr/bin/python3
import os,sys
from LanguageDepotAnalyze import Runner

# config file is specified, then used for the program!
cfgName = 'config.json'
dataPath = '../data'
if len(sys.argv) == 2:
    dataPath = sys.argv[1]
print("Analyzing directory %s\n" % dataPath)
runner = Runner(cfgName, dataPath)
runner.run()
{'fraction_non_alphanumeric': 0.11727416798732171, 'fraction_numerical': 0.006339144215530904, 'mean_word_length': 5.257425742574258, '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': '4695647', 'n_tokens_mistral': 205, 'n_tokens_neox': 201, 'n_words': 65}