def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("corpus", choices=CORPUS_PATH.keys(), help="Corpus identifier.") parser.add_argument("run_id", help="Run identifier") parser.add_argument("--train_with_dev", help="Use dev set during training", action='store_true') parser.add_argument("--model_file", help="Load existing model instead of training new.") parser.add_argument( "--pooled_contextual_embeddings", help="Boolean flag whether to use pooled variant of FlairEmbeddings.", action='store_true') parser.add_argument("--contextual_forward_path", help="Path to contextual string embeddings (forward)") parser.add_argument("--contextual_backward_path", help="Path to contextual string embeddings (backward)") parser.add_argument("--embedding_lang", choices=['en', 'nl'], help="Specify language of embeddings.") parser.add_argument( "--fine_tune", help="Fine tune an existing model (has to be passed with --model_file)", action='store_true') return parser.parse_args()
def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("corpus", choices=CORPUS_PATH.keys(), help="Corpus identifier.") parser.add_argument("run_id", help="Run Identifier") return parser.parse_args()
def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("corpus", choices=CORPUS_PATH.keys(), help="Corpus identifier.") parser.add_argument("run_id", help="Run identifier") parser.add_argument("feature_extractor", choices=crf_util.FEATURE_EXTRACTOR.keys(), help="Feature extractor.") return parser.parse_args()
def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("corpus", choices=CORPUS_PATH.keys(), help="Corpus identifier.") parser.add_argument("run_id", help="Run identifier") parser.add_argument("--train_sample_frac", help="Fraction of the training data to use.", type=float, default=0.1) parser.add_argument("--random_seed", help="Seed for the training set sampler.", type=int, default=42) return parser.parse_args()
def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("corpus", choices=CORPUS_PATH.keys(), help="Corpus identifier.") parser.add_argument("run_id", help="Run identifier") parser.add_argument("feature_extractor", choices=crf_util.FEATURE_EXTRACTOR.keys(), help="Feature extractor.") parser.add_argument("--n_iter", help="Number of random search trials", default=1, type=int) parser.add_argument("--n_jobs", help="Number of concurrent jobs", default=1, type=int) return parser.parse_args()
def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("corpus", choices=CORPUS_PATH.keys(), help="Corpus identifier.") parser.add_argument("run_id", help="Run identifier") parser.add_argument("--train_sample_frac", help="Fraction of the training data to use.", type=float, default=0.1) parser.add_argument("--random_seed", help="Seed for the training set sampler.", type=int, default=42) parser.add_argument("--save_final_model", help="If passed, the final model is saved.", action='store_true') parser.add_argument("--embedding_lang", choices = ['en','nl'], help="Specify language of embeddings.") return parser.parse_args()