}
-------------- */
protected static void saveModel(String filename, TaggerConfig config) {
try {
OutDataStreamFile file = new OutDataStreamFile(filename);
config.saveConfig(file);
file.writeInt(xSize);
file.writeInt(ySize);
dict.save(file);
tags.save(file);
saveExtractors(file);
file.writeInt(fAssociations.size());
for (Map.Entry<FeatureKey,Integer> item : fAssociations.entrySet()) {
int numF = item.getValue();
file.writeInt(numF);
FeatureKey fk = item.getKey();
fk.save(file);
}
LambdaSolve.save_lambdas(file, prob.lambda);
file.close();
} catch (IOException ioe) {
System.err.println("Error saving tagger to file " + filename);
ioe.printStackTrace();
}
}