flutter-painter commited on
Commit
5a4a746
1 Parent(s): 41a6de0

Update translation.py

Browse files
Files changed (1) hide show
  1. translation.py +5 -5
translation.py CHANGED
@@ -52,7 +52,7 @@ class TextPreprocessor:
52
  return clean
53
 
54
 
55
- def fix_tokenizer(tokenizer, new_lang="tyv_Cyrl"):
56
  """Add a new language token to the tokenizer vocabulary
57
  (this should be done each time after its initialization)
58
  """
@@ -112,8 +112,8 @@ class Translator:
112
  def translate(
113
  self,
114
  text,
115
- src_lang="rus_Cyrl",
116
- tgt_lang="tyv_Cyrl",
117
  max_length="auto",
118
  num_beams=4,
119
  by_sentence=True,
@@ -149,8 +149,8 @@ class Translator:
149
  def translate_single(
150
  self,
151
  text,
152
- src_lang="rus_Cyrl",
153
- tgt_lang="tyv_Cyrl",
154
  max_length="auto",
155
  num_beams=4,
156
  n_out=None,
 
52
  return clean
53
 
54
 
55
+ def fix_tokenizer(tokenizer, new_lang="fuf_Latn"):
56
  """Add a new language token to the tokenizer vocabulary
57
  (this should be done each time after its initialization)
58
  """
 
112
  def translate(
113
  self,
114
  text,
115
+ src_lang="fra_Latn",
116
+ tgt_lang="fuf_Latn",
117
  max_length="auto",
118
  num_beams=4,
119
  by_sentence=True,
 
149
  def translate_single(
150
  self,
151
  text,
152
+ src_lang="fra_Latn",
153
+ tgt_lang="fuf_Latn",
154
  max_length="auto",
155
  num_beams=4,
156
  n_out=None,