public static Document makeModel() throws Exception {
Element modelRoot = new Element("model");
modelRoot.appendChild(ExtractTrainingData.getInstance().toXML());
MEMM memm = MEMMSingleton.getInstance();
if(memm != null) modelRoot.appendChild(memm.writeModel());
NESubtypes subtypes = NESubtypes.getInstance();
if(subtypes.OK) modelRoot.appendChild(subtypes.toXML());
return new Document(modelRoot);
}