/** * Constructor which directly instantiates the BufferedReader containing * the model contents. * * @param br The BufferedReader containing the model information. */ public PlainTextPerceptronModelReader(BufferedReader br) { super(new PlainTextFileDataReader(br)); }
/** * Constructor which directly instantiates the BufferedReader containing the * model contents. * * @param br * The BufferedReader containing the model information. */ public PlainTextGISModelReader(BufferedReader br) { super(new PlainTextFileDataReader(br)); }
/** * Constructor which directly instantiates the BufferedReader containing the * model contents. * * @param br * The BufferedReader containing the model information. */ public PlainTextGISModelReader(BufferedReader br) { super(new PlainTextFileDataReader(br)); }
/** * Constructor which directly instantiates the BufferedReader containing * the model contents. * * @param br The BufferedReader containing the model information. */ public PlainTextPerceptronModelReader(BufferedReader br) { super(new PlainTextFileDataReader(br)); }
@Override public void loadModel(InputStream modelPath) { LOG.info("Loading MaxEnt model."); GISModelReader modelReader = new GISModelReader(new PlainTextFileDataReader(modelPath)); try { AbstractModel model = modelReader.getModel(); this.model = (GISModel) model; } catch (IOException e) { LOG.error("model load err.", e); } }
public AbstractModelReader(File f) throws IOException { String filename = f.getName(); InputStream input; // handle the zipped/not zipped distinction if (filename.endsWith(".gz")) { input = new GZIPInputStream(new FileInputStream(f)); filename = filename.substring(0,filename.length()-3); } else { input = new FileInputStream(f); } // handle the different formats if (filename.endsWith(".bin")) { this.dataReader = new BinaryFileDataReader(input); } else { // filename ends with ".txt" this.dataReader = new PlainTextFileDataReader(input); } }
public AbstractModelReader(File f) throws IOException { String filename = f.getName(); InputStream input; // handle the zipped/not zipped distinction if (filename.endsWith(".gz")) { input = new GZIPInputStream(new FileInputStream(f)); filename = filename.substring(0,filename.length()-3); } else { input = new FileInputStream(f); } // handle the different formats if (filename.endsWith(".bin")) { this.dataReader = new BinaryFileDataReader(input); } else { // filename ends with ".txt" this.dataReader = new PlainTextFileDataReader(input); } }