You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, how should I deal with the relationship between numerical values and numbers? In some quantitative units, such as money, date or time, numbers need to be read as numeric values, while some mobile phone tail numbers, ID numbers, and address numbers need to be read one by one. How should I handle this? I tested this script and found that they are all translated according to numerical reading.
The text was updated successfully, but these errors were encountered:
This will treat it as "one hundred and twenty three". Such handling is done through this package, which is like an extension of num2words for Indonesian.
But when it comes to your case of requiring each number to be read separately, you have to pre-split them like
which correctly gives the phonemes of "one, two, three", since each digit is treated as an individual word.
Currently, it is not supported to automatically distinguish between the two cases other than a manual split, since it is hard to distinguish when & where to do which. Perhaps for phone numbers, you can pre-define its format with regex (e.g. Indonesian phone numbers are +62xxx / 08xxxx), but I can't think of how you can do the same for ID numbers.
Hello, how should I deal with the relationship between numerical values and numbers? In some quantitative units, such as money, date or time, numbers need to be read as numeric values, while some mobile phone tail numbers, ID numbers, and address numbers need to be read one by one. How should I handle this? I tested this script and found that they are all translated according to numerical reading.
The text was updated successfully, but these errors were encountered: