File size: 1,498 Bytes
4f08d2c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
from argparse import ArgumentParser
from typing import List
def get_args():
"""
Parses command-line arguments for ALIGN-Multilingual.
Returns:
argparse.Namespace: Parsed arguments.
"""
parser = ArgumentParser(description="ALIGN-SentencePerturbation Argument Parser")
parser.add_argument(
"--dataset_name",
dest="dataset_name",
type=str,
default="mrpc",
choices=["mrpc", "qqp","paws"],
help="Name of the dataset to use.",
)
parser.add_argument(
"--task",
dest="task",
type=str,
default="syn",
choices=["syn", "anto","jumb","jumbling","paraphrase","para"],
help="Perturbation task to perform.",
)
parser.add_argument(
"--target_lang",
dest="target_lang",
type=str,
default="en",
help="Target language for translation.",
)
parser.add_argument(
"--output_dir",
dest="output_dir",
type=str,
default="./data/perturbed_dataset/",
help="Output directory for perturbed dataset.",
)
parser.add_argument(
"--save",
dest="save",
type=bool,
help="Whether to save the translated dataset to a file.",
)
parser.add_argument(
"--sample_size",
dest="sample_size",
type=int,
default=None,
help="Number of rows to process.",
)
return parser.parse_args() |