InputStream in = TrainTest.class.getResourceAsStream(TEST_DICTIONARY);
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
System.out.println("Building model...");
DefaultLemmatizer lm = new DefaultLemmatizer(br, format, settings);
lm.buildModel();
System.out.println("Model built");
System.out.println("Saving model...");
LemmatizerFactory.saveToFile(lm, tmpLemFile);
System.out.println("Model saved.");
assertLemmaEquals(lm, ACTUAL_WORDS, LEMMA_WORDS);
System.out.println("Clearing examples...");
lm.clearExamples();
System.out.println("Examples clear...");
System.out.println("Reading model from file");
lm = (DefaultLemmatizer) LemmatizerFactory.readFromFile(tmpLemFile);