Rolv-Arild
commited on
Commit
·
045e71b
1
Parent(s):
22fa673
Add add_kenlm.py
Browse files- add_kenlm.py +1 -2
add_kenlm.py
CHANGED
@@ -19,7 +19,7 @@ def main(args):
|
|
19 |
tokenizer=processor.tokenizer,
|
20 |
decoder=decoder,
|
21 |
)
|
22 |
-
processor_with_lm.save_pretrained(args.
|
23 |
print(
|
24 |
f"Run: ~/bin/build_binary language_model/*.arpa language_model/5gram.bin -T $(pwd) && rm language_model/*.arpa")
|
25 |
|
@@ -28,7 +28,6 @@ def parse_args():
|
|
28 |
parser = argparse.ArgumentParser()
|
29 |
parser.add_argument('--model_name_or_path', default="./", help='Model name or path. Defaults to ./')
|
30 |
parser.add_argument('--kenlm_model_path', required=True, help='Path to KenLM arpa file.')
|
31 |
-
parser.add_argument('--output_path', required=True, help='Path to KenLM arpa file.')
|
32 |
args = parser.parse_args()
|
33 |
return args
|
34 |
|
|
|
19 |
tokenizer=processor.tokenizer,
|
20 |
decoder=decoder,
|
21 |
)
|
22 |
+
processor_with_lm.save_pretrained(args.model_name_or_path)
|
23 |
print(
|
24 |
f"Run: ~/bin/build_binary language_model/*.arpa language_model/5gram.bin -T $(pwd) && rm language_model/*.arpa")
|
25 |
|
|
|
28 |
parser = argparse.ArgumentParser()
|
29 |
parser.add_argument('--model_name_or_path', default="./", help='Model name or path. Defaults to ./')
|
30 |
parser.add_argument('--kenlm_model_path', required=True, help='Path to KenLM arpa file.')
|
|
|
31 |
args = parser.parse_args()
|
32 |
return args
|
33 |
|