Newer
Older
"""Script for running the anonymizer from the command line.
Example usage:
```bash
python3 cli.py input.ccl output.txt --replace-method tag --language pl \
--configuration ccl
```
"""
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="anonymizer")
parser.add_argument("input_path", type=str, help="Path to the input file")
parser.add_argument("output_path", type=str, help="Path to the output file")
parser.add_argument(
"--replace-method",
type=str,
default="tag",
choices=["delete", "tag", "pseudo"],
help="Method of replacing tokens",
)
parser.add_argument(
"--language",
type=str,
default="pl",
choices=["pl"],
help="Language of the input text",
)
parser.add_argument(
"--configuration",
type=str,
default="ccl",
parser.add_argument(
"--deanonimizataion",
type=bool,
default=False,
help="Create file to deanonimzation",
)
args = parser.parse_args()
worker = Worker(configuration=args.configuration)
worker.process(
args.input_path,
{"method": args.replace_method, "language": args.language,
"deanonimizataion": args.deanonimizataion},