knadh/ml2en

Add exceptional words.

Closed this issue · 1 comments

How we can add our own exceptional words, so that during conversion these words are printed exactly as in key values.
Like this.....

var exception = { "ഇന്ത്യ":"india", "ഞാൻ":"njan", ......... };

How we can implement this?

knadh commented

This can be done trivially outside the lib. Before passing an input word to ml2en(), look it up in a map like the one in your example, and if it's a match, use that, otherwise, pass to ml2en.