Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number_to_words() convert and replace all numbers in a sentence instead of giving back only converted numbers #148

Open
jaykay9999 opened this issue Mar 21, 2022 · 1 comment

Comments

@jaykay9999
Copy link

I came across this library but in the documentation there was no convert numbers to words + change them in a sentence. so i made a function for that.

sentence = extract_replace("In 2019, mark saved $15 thousand, for a total savings of 54 thousand over eight years." ) print(sentence)

output : In two thousand and nineteen, mark saved $fifteen thousand, for a total savings of fifty-four thousand over eight years.

i made the extract_replace() function which calls another function that i made called find_num_index() .

i would appreciate if anyone can tell me if i can commit my work to help other people who might need this function to directly convert numbers to words in sentences in the future.

Thank you :)

@jaraco
Copy link
Owner

jaraco commented Mar 23, 2022

That seems like useful functionality. Feel free to send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants