Search
To work with the data from file truth.dsv, it will be convenient to read them into a dictionary which would tell you for each file what numeral or character is depicted on the image.
truth.dsv
Reading the data into a dictionary is not hard, you can try to implement it yourself:
Python contains standard module csv for easier work with .csv, .dsv or similar file formats. You can use it to read the truth.dsv file in a similar way as described here. You will only have to correctly specify the separator, i.e., set the parameter delimiter=“:” when calling csv.reader().
.csv
.dsv
delimiter=“:”
csv.reader()
Nevertheless, in this particular case the use of csv module will not save you much work (in comparison to manual processing of the .csv file as suggested above).
csv