Package uk.ac.cam.ch.wwmm.ptclib.misc

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.StringGISModelWriter.persist()


    Element root = new Element("rescorer");
    for(String type : modelsByType.keySet()) {
      Element maxent = new Element("maxent");
      maxent.addAttribute(new Attribute("type", type));
      StringGISModelWriter sgmw = new StringGISModelWriter(modelsByType.get(type));
      sgmw.persist();
      maxent.appendChild(sgmw.toString());
      root.appendChild(maxent);

    }
    return root;
View Full Code Here


    Element root = new Element("memm");
    for(String prev : gmByPrev.keySet()) {
      Element maxent = new Element("maxent");
      maxent.addAttribute(new Attribute("prev", prev));
      StringGISModelWriter sgmw = new StringGISModelWriter(gmByPrev.get(prev));
      sgmw.persist();
      maxent.appendChild(sgmw.toString());
      root.appendChild(maxent);
    }
    if(rescorer != null) {
      root.appendChild(rescorer.writeElement());
View Full Code Here

    if(true) return;
   
   
    long time = System.currentTimeMillis();
    StringGISModelWriter sgmw = new StringGISModelWriter(gis);
    sgmw.persist();
    String modelStr = sgmw.toString();

    //System.out.println(modelStr);
   
    StringGISModelReader sgmr = new StringGISModelReader(modelStr);
View Full Code Here

    for(String type : classifiers.keySet()) {
      Element c = new Element("classifier");
      e.appendChild(c);
      c.addAttribute(new Attribute("type", type));
      StringGISModelWriter sgmw = new StringGISModelWriter(classifiers.get(type));
      sgmw.persist();
      //System.out.println(sgmw.toString());
      c.appendChild(sgmw.toString());
    }
    return e;
  }
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.