有印地文单词搜索的NLP算法吗?

时间:2019-01-28 05:39:40

标签: jupyter-notebook

我正在尝试开发英文脚本中与算法相关的印地文单词,并且输出应为英文单词。

我尝试输入:Badaam输出:杏仁,但我想要输入:badam输出:杏仁

     import request
     from indic_transliteration import sanscript
     from indic_transliteration.sanscript import transliterate

     from googletrans import Translator
     translator = Translator()

     convert = 'badaam'

     word_obtained=transliterate(convert, sanscript.ITRANS, 
     sanscript.DEVANAGARI)
     print(word_obtained)

     translated = translator.translate(word_obtained, src='hi', dest='en')
     print(translated.text)

0 个答案:

没有答案