jaraco / jaraco/inflect

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

Open
#148 1 comment 0 reactions 0 assignees View on GitHub
feature help wanted
Dominant language
Python
Stars
1.1k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

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 :)

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the existing number_to_words() behavior and the proposed extract_replace() and find_num_index() entry points. Use the sample sentence and expected output as the initial acceptance check, then determine the library integration and test coverage needed for sentence-wide conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.