analysis on all possible files in a provided directory, writes to JSON
This commit is contained in:
24
readresult.py
Normal file
24
readresult.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import sys, json
|
||||
|
||||
path = sys.argv[1]
|
||||
|
||||
with open(path) as file:
|
||||
contents = json.load(file)
|
||||
|
||||
for line in contents:
|
||||
prediction = line['prediction']
|
||||
for section in prediction:
|
||||
for guess in section:
|
||||
if (float(guess[2]) > 0.75):
|
||||
print(line['path'])
|
||||
print("Probable match: " + guess[1])
|
||||
print(guess)
|
||||
print("\n")
|
||||
elif (float(guess[2]) > 0.3):
|
||||
print(line['path'])
|
||||
print("Potential match: " + guess[1])
|
||||
print(guess)
|
||||
print("\n")
|
||||
# else:
|
||||
# print(line['path'] + ": inconclusive")
|
||||
# print("\n")
|
||||
Reference in New Issue
Block a user