src/main/java/lv/semti/morphology/corpus/Statistics.java
public void toXML (Writer stream)
	throws IOException {
		stream.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
		stream.write("<Statistika>\n");
		stream.write("<Galotņu_biežums\n");
		for (Entry<Integer,Integer> tuple : endingFrequency.entrySet()) {
			stream.write(" Galotne_"+tuple.getKey().toString()+"=\""+tuple.getValue().toString()+"\"");
		}
		stream.write("/>\n");

		stream.write("<Leksēmu_biežums\n");
		for (Entry<Integer,Integer> tuple : lexemeFrequency.entrySet()) {
			stream.write(" Leksēma_"+tuple.getKey().toString()+"=\""+tuple.getValue().toString()+"\"");
		}
		stream.write("/>\n");
		stream.write("</Statistika>\n");
		stream.flush();
	}
public void toXML (Writer stream)
	throws IOException {
		stream.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
		stream.write("<Statistika>\n");
		stream.write("<Galotņu_biežums\n");
		for (Entry<Integer,Integer> tuple : endingFrequency.entrySet()) {
			stream.write(" Galotne_"+tuple.getKey().toString()+"=\""+tuple.getValue().toString()+"\"");
		}
		stream.write("/>\n");

		stream.write("<Leksēmu_biežums\n");
		for (Entry<Integer,Integer> tuple : lexemeFrequency.entrySet()) {
			stream.write(" Leksēma_"+tuple.getKey().toString()+"=\""+tuple.getValue().toString()+"\"");
		}
		stream.write("/>\n");
		stream.write("</Statistika>\n");
		stream.flush();
	}
Convert frequency data in XML format.
@param stream	output stream.