diff --git a/get_translation_iiith_hindi_telugu.py b/get_translation_iiith_hindi_telugu.py index c46ce91ba6b85ceb00157fb96545625c487fb420..5ae03116ca42c2fd176e764a54318f06567818ec 100644 --- a/get_translation_iiith_hindi_telugu.py +++ b/get_translation_iiith_hindi_telugu.py @@ -31,7 +31,7 @@ def read_file(path, isref=False): _data_source = read_file(source_file) _data_sys = [call_mt(text, 'hin', 'tel').replace('\n',' ') for text in tqdm(_data_source)] -_f = open(output_file, 'w') +_f = open(output_file, 'w', encoding="utf8") for line in _data_sys: _f.write(line+'\n') print (line) diff --git a/get_translation_iiith_telugu_hindi.py b/get_translation_iiith_telugu_hindi.py index 4eda61d8226492fbd4a8af538dc39b1abf892c40..bb429511fcd35175f5a5b854e5f50ccc5a279321 100644 --- a/get_translation_iiith_telugu_hindi.py +++ b/get_translation_iiith_telugu_hindi.py @@ -31,7 +31,7 @@ def read_file(path, isref=False): _data_source = read_file(source_file) _data_sys = [call_mt(text, 'tel', 'hin').replace('\n',' ') for text in tqdm(_data_source)] -_f = open(output_file, 'w') +_f = open(output_file, 'w', encoding="utf8") for line in _data_sys: _f.write(line+'\n') print (line)