Sha256: 4cfa6ae460c89728f103464c335901e39f77dd1232ba069f2e8c2990dce56302

Contents?: true

Size: 1.05 KB

Versions: 45

Compression:

Stored size: 1.05 KB

Contents

package lingscope.drivers;

import lingscope.algorithms.Annotator;

/**
 * Driver to train a model file. The training data will have to be provided.
 * @author shashank
 */
public class ModelTrainer {

    /**
     * Prints the usage for the model trainer
     */
    public static void usage() {
        System.out.println("Usage:\njava lingscope.drivers.ModelTrainer (cue|scope) (crf|baseline|negex) training_data_file file_where_model_will_be_saved");
    }

    /**
     *
     * @param args
     * 0 - Annotator type ("cue" or "scope")
     * 1 - Model type ("crf", "baseline" or "negex")
     * 2 - File from which training data will be read
     * 2 - File where the model will be saved
     */
    public static void main(String[] args) {
        if (args.length != 4) {
            usage();
            System.exit(0);
        }
        Annotator annotator = SentenceTagger.getAnnotator(args[1], args[0]);
        if (annotator == null) {
            usage();
            System.exit(1);
        }
        annotator.serializeAnnotator(args[2], args[3]);
    }
    
}

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
abstractor-4.4.7 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.6 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.5 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.4 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.3 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.2 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.1 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.4.0 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.3.3 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.3.2 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.3.1 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.3.0 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.2.3 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.2.2 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.2.1 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.2.0 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.1.5 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.1.4 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.1.3 lib/lingscope/src/lingscope/drivers/ModelTrainer.java
abstractor-4.1.2 lib/lingscope/src/lingscope/drivers/ModelTrainer.java