public void loadModel(String file) throws Exception { ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); params.parameters = (double[]) in.readObject(); pipe.dataAlphabet = (Alphabet) in.readObject(); pipe.typeAlphabet = (Alphabet) in.readObject(); in.close(); pipe.closeAlphabets(); }
public void loadModel(String file) throws Exception { ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); params.parameters = (double[]) in.readObject(); pipe.dataAlphabet = (Alphabet) in.readObject(); pipe.typeAlphabet = (Alphabet) in.readObject(); // afm 06-04-08 if (options.separateLab) { classifier = (Classifier) in.readObject(); } in.close(); pipe.closeAlphabets(); }