numbers_in_words
numbers_in_words copied to clipboard
support short names
I think that it will be awesome to support short names as M
, kk
, MM
for million
.
What do you think?
Yeah maybe. What would the API for that look like?
what about a dictionary with the origin names and shortcuts? Then preprocess string and change shortcuts on origin using regexp?
I don't mean the implementation, I mean the way it is called. It's easy enough to do strings to numbers but I'm not sure how you'd specify the other way round. On Thu, 18 May 2017 at 08:18, Alexey Zenovich [email protected] wrote:
what about a dictionary with the origin names and shortcuts? Then preprocess string and change shortcuts on origin using regexp?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/markburns/numbers_in_words/issues/17#issuecomment-302257594, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGW3rHAM4HA-O3VohAmbO3YngXsevfZks5r64BGgaJpZM4Nbyst .
Got it. From my point of view, it can be in in_numbers
@markburns what do you think?
You haven't really addressed the ambiguity issue On Sat, 20 May 2017 at 07:58, Alexey Zenovich [email protected] wrote:
@markburns https://github.com/markburns what do you think?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/markburns/numbers_in_words/issues/17#issuecomment-302829103, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGW3kUWb0Br42emTrjmd3L_5THpcQQYks5r7h6egaJpZM4Nbyst .
Maybe. But for me string like one mln
it is a number as a words.
How do you specify the output? You listed a few variations of the same thing but not how to specify which if any you'd want. Of course the other way is easy. On Sat, 20 May 2017 at 10:07, Alexey Zenovich [email protected] wrote:
Maybe. But for me string like one mln it is a number as a word.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/markburns/numbers_in_words/issues/17#issuecomment-302841152, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGW3tj_PJKJhbFcL6VJWDbMZxt7BFiIks5r7jzcgaJpZM4Nbyst .
Sorry. Output is a digit number one mln
-> 1_000_000
Right but that's the easy part. It's the other direction that's not clear how to specify On Sat, 20 May 2017 at 11:36, Alexey Zenovich [email protected] wrote:
output is a digit number one mln -> 1_000_000
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/markburns/numbers_in_words/issues/17#issuecomment-302845511, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGW3qSgq1FDF8LPv5Zh-vKikzQSJfOpks5r7lHGgaJpZM4Nbyst .
So can add an option like abbreviation
that will false by default. When true
- use the most popular abbreviation (will be first in the list) instead of the word or use the word if no abbreviation. That's what you mean?