Set defaults for convert command

This commit is contained in:
Matthew Honnibal 2017-08-13 09:03:38 +02:00
parent 92ebab6073
commit 4ae0d5e1e6

View File

@ -21,10 +21,10 @@ CONVERTERS = {
@plac.annotations( @plac.annotations(
input_file=("input file", "positional", None, str), input_file=("input file", "positional", None, str),
output_dir=("output directory for converted file", "positional", None, str), output_dir=("output directory for converted file", "positional", None, str),
n_sents=("Number of sentences per doc", "option", "n", float), n_sents=("Number of sentences per doc", "option", "n", int),
morphology=("Enable appending morphology to tags", "flag", "m", bool) morphology=("Enable appending morphology to tags", "flag", "m", bool)
) )
def convert(cmd, input_file, output_dir, n_sents, morphology): def convert(cmd, input_file, output_dir, n_sents=1, morphology=False):
""" """
Convert files into JSON format for use with train command and other Convert files into JSON format for use with train command and other
experiment management functions. experiment management functions.