usage for converting number to malayalam text
can you please advise on usage of python wrapper of mlmorph analyzer for converting number to malayalam text.
tried
from mlmorph import Analyser
analyser = Analyser()
analyser.analyse("100")
but that does not seem to be the way
There are a few more stepes involved in it. We need to use generate with input like രണ്ട്<ones><thousands>മൂന്ന്<hundreds>നാല്<tens>അഞ്ച്<ones><cardinal>. Converting a number to this format is quite easy. Please see the code - https://github.com/smc/mlmorph/blob/master/docs/components/Number.vue#L41
Then use that with generare API or python generate method.
Web API example:
https://morph.smc.org.in/api/generate?word=രണ്ട്<ones><thousands>മൂന്ന്<hundreds>നാല്<tens>അഞ്ച്<ones><cardinal>
thanks much.
it was straight forward to convert the code to python. created a pull request : adding python function for number spell out
ps. it does not meet the contributions guidelines, anyhow sharing here so that you can decide.
btw, in line https://github.com/smc/mlmorph/blob/4641a5814a90b4e7b0dbea011f535218dd17f068/docs/components/Number.vue#L36
"hundredsa" a typo?
btw, in line
https://github.com/smc/mlmorph/blob/4641a5814a90b4e7b0dbea011f535218dd17f068/docs/components/Number.vue#L36
"hundredsa" a typo?
Fixed as part of f61d79e