示例#1
0
 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();
 }
示例#2
0
  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();
  }