Created
April 15, 2021 15:56
-
-
Save mikegerber/237999165a0fdb397b20812ad8ce2bfe to your computer and use it in GitHub Desktop.
Extract metrics from dinglehopper JSON exports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import json | |
FIELDS = ["gt", "ocr", "cer", "wer", "n_characters", "n_words"] | |
FILES = glob.glob("*.json") | |
print("file;" + ";".join(FIELDS)) | |
for f in FILES: | |
print(f, end="") | |
j = json.load(open(f)) | |
for field in FIELDS: | |
value = j[field] | |
print(";" + str(value), end="") | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment