continue mime = line["MIME"] filename = os.path.basename(filename) filename = filename.split(".")[0] try: key = int(filename) except ValueError: continue existingMimes = identificationsKeyToMime.get(key,[]) existingMimes.append(mime) identificationsKeyToMime[key] = existingMimes #The parser operation just retrieve the entry from the parsed csv file def tikaParser(filename): #print ("opening ", reportFile) filename = os.path.basename(filename) filename = filename.split(".")[0] key = int(filename) mime = identificationsKeyToMime[key] return mime tikaEval = ToolPrecisionTest() tikaEval.verbal = True tikaEval.groundTruth = govdocs1.groundTruth tikaEval.reportParser = tikaParser
filename = filename.split(".")[0] try: key = int(filename) except ValueError: continue existingMimes = identificationsKeyToMime.get(key,[]) existingMimes.append(mime) identificationsKeyToMime[key] = existingMimes #The parser operation just retrieve the entry from the parsed csv file def fidoParser(datafile): #print ("opening ", reportFile) filename = datafile.split(".")[0] key = int(filename) mime = identificationsKeyToMime[key] return mime fidoEval = ToolPrecisionTest() fidoEval.reportParser = fidoParser fidoEval.verbal = True
filename = filename.split(".")[0] try: key = int(filename) except ValueError: continue existingMimes = identificationsKeyToMime.get(key,[]) existingMimes.append(mime) identificationsKeyToMime[key] = existingMimes #The parser operation just retrieve the entry from the parsed csv file def droidParser(datafile): #print ("opening ", reportFile) filename = datafile.split(".")[0] key = int(filename) mime = identificationsKeyToMime[key] return mime droidEval = ToolPrecisionTest() droidEval.reportParser = droidParser droidEval.verbal = True
continue mime = line["MIME"] filename = os.path.basename(filename) filename = filename.split(".")[0] try: key = int(filename) except ValueError: continue existingMimes = identificationsKeyToMime.get(key,[]) existingMimes.append(mime) identificationsKeyToMime[key] = existingMimes #The parser operation just retrieve the entry from the parsed csv file def fileParser(filename): #print ("opening ", reportFile) filename = os.path.basename(filename) filename = filename.split(".")[0] key = int(filename) mime = identificationsKeyToMime[key] return mime fileEval = ToolPrecisionTest() fileEval.verbal = True fileEval.groundTruth = govdocs1.groundTruth fileEval.reportParser = fileParser