Function Repository Resource:

ShabdkoshTranslateWord

Source Notebook

Translate a word from English to Marathi or Hindi using the Shabdkosh service

Contributed by: Aryan Deshpande

ResourceFunction["ShabdkoshTranslateWord"][word,"lang"]

translates word from English to Marathi or Hindi, based on the language "lang".

Details

The translation is done by a web service called Shabdkosh. The result is a list of possible translations.
The "lang" argument currently supports "Marathi" and "Hindi", with "Marathi" as the default.

Examples

Basic Examples (3) 

Translate a word to Marathi:

In[1]:=
ResourceFunction["ShabdkoshTranslateWord"]["boy", "Marathi"]
Out[1]=

Translate a word to Hindi:

In[2]:=
ResourceFunction["ShabdkoshTranslateWord"]["computer", "Hindi"]
Out[2]=

If "lang" is not provided, the language defaults to "Marathi":

In[3]:=
ResourceFunction["ShabdkoshTranslateWord"]["pen"]
Out[3]=

Scope (3) 

The function can also be used to translate sentences: English to Marathi:

In[4]:=
ResourceFunction["ShabdkoshTranslateWord"][#, "Marathi"] & /@ StringSplit["This is a test using a computer", " "]
Out[4]=

English to Hindi:

In[5]:=
ResourceFunction["ShabdkoshTranslateWord"][#, "Hindi"] & /@ StringSplit["This is a test using a computer", " "]
Out[5]=

Compare the results with the built-in function WordTranslation:

In[6]:=
WordTranslation[#, "Marathi"] & /@ StringSplit["This is a test using a computer", " "]
Out[6]=
In[7]:=
WordTranslation[#, "Hindi"] & /@ StringSplit["This is a test using a computer", " "]
Out[7]=

Publisher

Aryan Deshpande

Version History

  • 1.0.0 – 09 March 2021

Related Resources

License Information