try {
TrainingImageLoader loader = new TrainingImageLoader();
HashMap<Character, ArrayList<TrainingImage>> hashMap = new HashMap<Character, ArrayList<TrainingImage>>();
for (int i = 0; i < 10; i++) {
File file = new File(SystemConfiguration.TRAINING_DIRECTORY, "char" + i + ".png");
loader.load(frame, file.getAbsolutePath(), new CharacterRange('0' + i, '0' + i), hashMap);
}
scanner.addTrainingImages(hashMap);
} catch (IOException e) {
throw new RuntimeException(e);
}