conversion changes audit from one particular user
This commit is contained in:
parent
6e15d10fd0
commit
7cd8c3946a
|
@ -461,11 +461,15 @@ def translate_comparison2(text, source_lang, target_lang, script_data=None, subs
|
|||
|
||||
if is_dialogue:
|
||||
tokenizers_valid_langs = ("malayalam", "french", "italian", "german", "spanish", "swedish", "finnish", "danish", "english", "slovene", "norwegian", "dutch", "portuguese", "czech", "russian", "polish","turkish", "estonian", "greek")
|
||||
try:
|
||||
if code_2_language[source_lang].lower() in tokenizers_valid_langs:
|
||||
sentences = sent_tokenize(text, language=(code_2_language[source_lang]).lower())
|
||||
else:
|
||||
sentences = text.split(".")
|
||||
except Exception as e:
|
||||
print("Error was : ", e)
|
||||
return text
|
||||
|
||||
if code_2_language[source_lang].lower() in tokenizers_valid_langs:
|
||||
sentences = sent_tokenize(text, language=(code_2_language[source_lang]).lower())
|
||||
else:
|
||||
sentences = text.split(".")
|
||||
|
||||
# List of translated sentences
|
||||
translated_text = []
|
||||
|
|
|
@ -194,6 +194,6 @@ def checker(text, src_lang, tar_lang):
|
|||
# end_time = time.time()
|
||||
# print("Time took is ->", end_time - start_time)
|
||||
|
||||
print("Prince was Here!!!")
|
||||
text = "Amazing to see everything alright."
|
||||
checker(text, 'en', 'el')
|
||||
# print("Prince was Here!!!")
|
||||
# text = "Amazing to see everything alright."
|
||||
# checker(text, 'en', 'el')
|
||||
|
|
Loading…
Reference in New Issue