<commit_before>import csv
import os
import time

import subprocess
from scapetesting import govdocs1
from scapetesting.toolevaluation.toolEvaluation import ToolEvaluation
from scapetesting.govdocs1 import groundTruth
from scapetesting.toolevaluation.reportParser import ToolPrecisionTest

from scapetesting.toolevaluation.util import ensure_dir


__author__ = 'abr'



print("running")


_groundTruth = groundTruth.groundTruths

identificationsKeyToMime = {}


def tikaReportLoader(reportFile):
    #print ("opening ", reportFile)
    type = ""
    encoding = ""
    with open(reportFile) as f:
        reader = csv.DictReader(f, fieldnames=["FILE","MIME"], delimiter=":")
        for line in reader:
            filename = line["FILE"]
            if filename is None or len(filename) == 0:
                continue
            mime = line["MIME"]
            filename = os.path.basename(filename)
            filename = filename.split(".")[0]
            try:
                key = int(filename)<commit_msg>removed unused import statements<commit_after>import csv
import os

from scapetesting import govdocs1
from scapetesting.govdocs1 import groundTruth
from scapetesting.toolevaluation.reportParser import ToolPrecisionTest


__author__ = 'abr'



print("running")


_groundTruth = groundTruth.groundTruths

identificationsKeyToMime = {}


def tikaReportLoader(reportFile):
    #print ("opening ", reportFile)
    type = ""
    encoding = ""
    with open(reportFile) as f:
        reader = csv.DictReader(f, fieldnames=["FILE","MIME"], delimiter=":")
        for line in reader:
            filename = line["FILE"]
            if filename is None or len(filename) == 0:
                continue
            mime = line["MIME"]
            filename = os.path.basename(filename)
            filename = filename.split(".")[0]
            try:
                key = int(filename)
{'fraction_non_alphanumeric': 0.09574468085106383, 'fraction_numerical': 0.00425531914893617, 'mean_word_length': 2.8944099378881987, 'pattern_counts': {'":': 2, '<': 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': '5310735', 'n_tokens_mistral': 570, 'n_tokens_neox': 531, 'n_words': 134}