Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
[app] add support for numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephGeoBenjamin committed Aug 20, 2020
1 parent 8c3a0d8 commit 7c72584
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/api_expose.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ def transliterate(self, lang_code, eng_word):
elif lang_code == "mai":
return self.maithili_engine(eng_word)

except:
except error as Exception:
print("Error:", error)
return XlitError.unknown_err

def _clean(self, word):
word = word.lower()
accepted = "abcdefghijklmnopqrstuvwxyz"
accepted = "abcdefghijklmnopqrstuvwxyz1234567890."
word = ''.join([i for i in word if i in accepted])
return word

Expand Down

0 comments on commit 7c72584

Please sign in to comment.