numbers_in_words icon indicating copy to clipboard operation
numbers_in_words copied to clipboard

support short names

Open idej opened this issue 7 years ago • 11 comments

I think that it will be awesome to support short names as M, kk, MM for million. What do you think?

idej avatar May 15 '17 22:05 idej

Yeah maybe. What would the API for that look like?

markburns avatar May 16 '17 03:05 markburns

what about a dictionary with the origin names and shortcuts? Then preprocess string and change shortcuts on origin using regexp?

idej avatar May 17 '17 23:05 idej

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 .

markburns avatar May 17 '17 23:05 markburns

Got it. From my point of view, it can be in in_numbers

idej avatar May 17 '17 23:05 idej

@markburns what do you think?

idej avatar May 19 '17 22:05 idej

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 .

markburns avatar May 20 '17 00:05 markburns

Maybe. But for me string like one mln it is a number as a words.

idej avatar May 20 '17 01:05 idej

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 .

markburns avatar May 20 '17 01:05 markburns

Sorry. Output is a digit number one mln -> 1_000_000

idej avatar May 20 '17 02:05 idej

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 .

markburns avatar May 20 '17 02:05 markburns

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?

idej avatar May 20 '17 04:05 idej