-
Notifications
You must be signed in to change notification settings - Fork 2
/
repl.py
28 lines (23 loc) · 808 Bytes
/
repl.py
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
import sys
import os
import pickle as pkl
import argparse
from src.Dialects import AfricanAmericanVernacular
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A REPL for the VALUE Transformations")
parser.add_argument("--transform", type=str, default=None, required=False)
args = parser.parse_args()
if args.transform == "aave_like":
mapping = {}
converter = AfricanAmericanVernacular(mapping, morphosyntax=True)
else:
print("Please select a dialect with a supported set of transformations!")
sys.exit()
while True:
example = input("Enter an input in SAE: ")
print(
"After "
+ converter.dialect_name
+ ": "
+ converter.convert_sae_to_dialect(example)
)