public POSTrain(int iter) { this.iter = iter; rm = new POSConfigurator().getDefaultConfig(); this.init(); }
/** * Returns a new, emtpy learner into which all of the parameters that control the behavior of * the algorithm have been copied. Here, "emtpy" means no learning has taken place. **/ public Learner emptyClone() { return new MikheevLearner(); }
public static void main(String[] args) { ResourceManager rm = new POSConfigurator().getDefaultConfig(); TestPOSModels test = new TestPOSModels(rm.getString("testData")); test.testAccuracy(); }
public POSTrain(int iter, String configFile) throws IOException { this.iter = iter; rm = new POSConfigurator().getConfig(new ResourceManager(configFile)); this.init(); }
/** * Reads the binary representation of a learner with this object's run-time type, overwriting * any and all learned or manually specified parameters as well as the label lexicon but without * modifying the feature lexicon. * * @param in The input stream. **/ public void read(ExceptionlessInputStream in) { super.read(in); POSBaselineLearner.read(in, firstCapitalized); POSBaselineLearner.read(in, notFirstCapitalized); }
/** * Returns the value of the discrete prediction that this learner would make, given an example. * * @param example The example object. * @return The discrete value. **/ public String discreteValue(Object example) { return computePrediction(example); }
/** * Returns a new, emtpy learner into which all of the parameters that control the behavior of * the algorithm have been copied. Here, "emtpy" means no learning has taken place. **/ public Learner emptyClone() { return new POSBaselineLearner(); }
/** * Writes the algorithm's internal representation as text. * * @param out The output stream. **/ public void write(PrintStream out) { write(out, table); }
public POSTrain(int iter) { this.iter = iter; rm = new POSConfigurator().getDefaultConfig(); this.init(); }
public POSTrain(int iter, String configFile) throws IOException { this.iter = iter; rm = new POSConfigurator().getConfig(new ResourceManager(configFile)); this.init(); }
/** * Reads the binary representation of a learner with this object's run-time * type, overwriting any and all learned or manually specified parameters * as well as the label lexicon but without modifying the feature lexicon. * * @param in The input stream. **/ public void read(ExceptionlessInputStream in) { super.read(in); POSBaselineLearner.read(in, firstCapitalized); POSBaselineLearner.read(in, notFirstCapitalized); }
/** * Returns a new, emtpy learner into which all of the parameters that control the behavior of * the algorithm have been copied. Here, "emtpy" means no learning has taken place. **/ public Learner emptyClone() { return new MikheevLearner(); }
/** * Returns the value of the discrete prediction that this learner would make, given an example. * * @param example The example object. * @return The discrete value. **/ public String discreteValue(Object example) { return computePrediction(example); }
/** * Reads the binary representation of a learner with this object's run-time type, overwriting * any and all learned or manually specified parameters as well as the label lexicon but without * modifying the feature lexicon. * * @param in The input stream. **/ public void read(ExceptionlessInputStream in) { super.read(in); POSBaselineLearner.read(in, firstCapitalized); POSBaselineLearner.read(in, notFirstCapitalized); }
/** * Writes the algorithm's internal representation as text. * * @param out The output stream. **/ public void write(PrintStream out) { write(out, table); }