Newer
Older
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
from src.worker import Worker
import argparse
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",
choices=["ccl", "wiktorner_jsonl"],
help="Configuration of the anonymizer",
)
args = parser.parse_args()
worker = Worker(configuration=args.configuration)
worker.process(
args.input_path,
{"method": args.replace_method, "language": args.language},
args.output_path,
)
print("Done")