From 8b17fd6ad2cd5a351993494c484dc0700aad8c14 Mon Sep 17 00:00:00 2001 From: Joseph Geo Benjamin Date: Tue, 1 Sep 2020 10:49:36 +0530 Subject: [PATCH] [apps] modify cleaning logic moved to engine --- apps/api_expose.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/api_expose.py b/apps/api_expose.py index aeba9aa..b2bedcc 100644 --- a/apps/api_expose.py +++ b/apps/api_expose.py @@ -129,7 +129,7 @@ def __init__(self): self.langs = {"hi": "Hindi", "gom": "Konkani (Goan)", "mai": "Maithili"} try: - from models.hindi.program85 import inference_engine as hindi_engine + from models.hindi.hi_program110 import inference_engine as hindi_engine self.hindi_engine = hindi_engine except Exception as error: print("Failure in loading Hindi \n", error) @@ -150,7 +150,6 @@ def __init__(self): del self.langs['mai'] def transliterate(self, lang_code, eng_word): - eng_word = self._clean(eng_word) if eng_word == "": return [] @@ -170,11 +169,6 @@ def transliterate(self, lang_code, eng_word): print("Error:", error) return XlitError.unknown_err - def _clean(self, word): - word = word.lower() - accepted = "abcdefghijklmnopqrstuvwxyz1234567890." - word = ''.join([i for i in word if i in accepted]) - return word ## -------------------------- Server Setup ---------------------------------- ##