Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, name, argv):
parser = argparse.ArgumentParser(**cli.make_usage("tag " + name))
parser.add_argument(
"text", type=str, help="input text",
)
parser.add_argument(
"-s",
"--sep",
dest="separator",
type=str,
help=f"Token separator for input text. default: {self.separator}",
default=self.separator,
)
args = parser.parse_args(argv)
self.args = args
tokens = args.text.split(args.separator)
def __init__(self, argv):
parser = argparse.ArgumentParser(**cli.make_usage("corpus"))
parser.add_argument(
"--name",
type=str,
help="corpus's name",
)
parser.add_argument(
"command",
type=str,
default="",
nargs="?",
help="[download|remove]"
)
args = parser.parse_args(argv[2:])
def __init__(self, name, argv):
parser = argparse.ArgumentParser(**cli.make_usage("benchmark " + name))
parser.add_argument(
"--input-file",
action="store",
help="Path to input file to compare against the test file",
)
parser.add_argument(
"--test-file",
action="store",
help="Path to test file i.e. ground truth",
)
parser.add_argument(
"--save-details",
default=False,
def __init__(self, name, argv):
parser = argparse.ArgumentParser(**cli.make_usage("tokenize " + name))
parser.add_argument(
"text", type=str, nargs="?", help="input text",
)
parser.add_argument(
"-s",
"--sep",
dest="separator",
type=str,
help=f"default: {self.separator}",
default=self.separator,
)
parser.add_argument(
"-a",
"--algo",
dest="algorithm",
type=str,