varnamproject / govarnam

Easily type Indic languages on computer and mobile. GoVarnam is a cross-platform transliteration library. Manglish -> Malayalam, Thanglish -> Tamil, Hinglish -> Hindi plus another 10 languages. GoVarnam is a near-Go port of libvarnam
https://varnamproject.com
Other
145 stars 11 forks source link

Add varnam_get_suggestions() #11

Closed subins2000 closed 3 years ago

subins2000 commented 3 years ago

Add a new functionality varnam_get_suggestions(string word) to get all suggestions from dictionary starting with a particular word. This word won't be English but a language word itself.

Example:

varnam_get_suggestions("മല")
// Gives മലയാളം മലയാളചലച്ചിത്രം മലപ്പുറം മലയാളത്തിൽ

How is it useful ?

One useful case is with Inscript engines. An Inscript engine is letter-by-letter, there's no Manglish, so once you make a word it will help in giving suggestions. Currently govarnam-ibus gives Inscript output English first and then user has to pick suggestion to complete the word. This is bad practice as the Inscript English key output will be hard to understand.