transliteration-decoder: improve case-awareness to produce more precise translations
This commit is contained in:
parent
0def45c6ce
commit
d0f2827d66
|
@ -14,6 +14,7 @@ if self.MESSAGE['text'].split()[0] == "!decode" and (2 <= len(self.MESSAGE['text
|
||||||
else:
|
else:
|
||||||
for i in models[chosen_model]:
|
for i in models[chosen_model]:
|
||||||
translated_t = translated_t.replace(i[0], i[1])
|
translated_t = translated_t.replace(i[0], i[1])
|
||||||
|
translated_t = translated_t.replace(i[0].capitalize(), i[1].capitalize())
|
||||||
translated_t = translated_t.replace(i[0].upper(), i[1].upper())
|
translated_t = translated_t.replace(i[0].upper(), i[1].upper())
|
||||||
|
|
||||||
self.RESPONCE = f"Результат: {translated_t}"
|
self.RESPONCE = f"Результат: {translated_t}"
|
||||||
|
|
Loading…
Reference in New Issue