Examples of saveTo()


Examples of org.fnlp.ml.classifier.linear.Linear.saveTo()

    OnlineTrainer trainer = new OnlineTrainer(msolver, update, loss, af.size(), round,
        c);

    Linear classify = trainer.train(train, test);
    String modelFile = path+".m.gz";
    classify.saveTo(modelFile);

    long end = System.currentTimeMillis();
    System.out.println("Total Time: " + (end - start));
    System.out.println("End!");
    (new File(modelFile)).deleteOnExit();
View Full Code Here

Examples of org.fnlp.ml.classifier.linear.Linear.saveTo()

    pp.removeTargetPipe();
    pclassifier.setPipe(pp);
    af.setStopIncrement(true);
   
    //将分类器保存到模型文件
    pclassifier.saveTo(modelFile)
    pclassifier = null;
   
    //从模型文件读入分类器
    Linear cl =Linear.loadFrom(modelFile);
   
View Full Code Here

Examples of org.fnlp.ml.classifier.linear.Linear.saveTo()

    pp.removeTargetPipe();
    pclassifier.setPipe(pp);
    af.setStopIncrement(true);
   
    //将分类器保存到模型文件
    pclassifier.saveTo(linearModelFile)
    pclassifier = null;
   
    //从模型文件读入分类器
    Linear cl =Linear.loadFrom(linearModelFile);
   
View Full Code Here

Examples of org.fnlp.ml.classifier.linear.Linear.saveTo()

    pp.removeTargetPipe();
    pclassifier.setPipe(pp);
    af.setStopIncrement(true);
   
    //将分类器保存到模型文件
    pclassifier.saveTo(modelFile)
    pclassifier = null;
   
    //从模型文件读入分类器
    Linear cl =Linear.loadFrom(modelFile);
   
View Full Code Here

Examples of org.fnlp.ml.classifier.linear.Linear.saveTo()

    solver = null;
    loss = null;
    trainer = null;
    System.out.println();
    factory.setStopIncrement(true);
    models.saveTo(modelfile);

  }


  /**
 
View Full Code Here

Examples of org.fnlp.nlp.cn.tag.AbstractTagger.saveTo()

      IOException {
    AbstractTagger cl = new POSTagger(file);
     

    addEnTag(cl,file);
    cl.saveTo(file);
  }

  private void addEnTag(AbstractTagger cl, String file) throws IOException {
    LabelAlphabet label = cl.factory.DefaultLabelAlphabet()
    HashMap<String, String> map = MyCollection.loadStringStringMap(c2ePath);
View Full Code Here

Examples of org.fnlp.nlp.cn.tag.POSTagger.saveTo()

      IOException {
    AbstractTagger cl = new POSTagger(file);
     

    addEnTag(cl,file);
    cl.saveTo(file);
  }

  private void addEnTag(AbstractTagger cl, String file) throws IOException {
    LabelAlphabet label = cl.factory.DefaultLabelAlphabet()
    HashMap<String, String> map = MyCollection.loadStringStringMap(c2ePath);
View Full Code Here

Examples of org.infinitest.InfinitestSettings.saveTo()

  @Test
  public void canSavePropertiesToAStream() throws IOException {
    InfinitestSettings settings = new InfinitestSettings();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    settings.saveTo(outputStream);
    Properties properties = new Properties();
    properties.load(new ByteArrayInputStream(outputStream.toByteArray()));
    assertEquals("true", properties.getProperty(IS_ENABLED));
  }
}
View Full Code Here

Examples of org.rssowl.ui.internal.editors.feed.NewsColumnViewModel.saveTo()

  public void testNewsColumnViewModel() throws Exception {
    IFolder root = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));
    IPreferenceScope prefs = Owl.getPreferenceService().getEntityScope(root);

    NewsColumnViewModel model = NewsColumnViewModel.createFrom(new int[] { 5, 4, 3, 6, 1 }, 3, true);
    model.saveTo(prefs);

    NewsColumnViewModel loadedModel = NewsColumnViewModel.loadFrom(prefs);
    assertTrue(loadedModel.isAscending());
    assertEquals(3, loadedModel.getSortColumn().ordinal());
    List<NewsColumn> columns = loadedModel.getColumns();
View Full Code Here

Examples of org.rssowl.ui.internal.editors.feed.NewsColumnViewModel.saveTo()

    /* Store Column Model */
    if (!fResultViewer.getTable().isDisposed()) {
      NewsColumnViewModel model = NewsColumnViewModel.initializeFrom(fResultViewer.getTable());
      model.setSortColumn(fNewsSorter.getSortBy());
      model.setAscending(fNewsSorter.isAscending());
      model.saveTo(fPreferences, true);
    }

    /* Store Preferences */
    fPreferences.putBoolean(DefaultPreferences.SEARCH_DIALOG_PREVIEW_VISIBLE, fIsPreviewVisible);
    if (fCachedWeights != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.