[Telemelody] BUG: clean function in infer_en.py causes the example test to raise ValueError
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 499
- PR merge metrics
- No merged PRs in 30d
Description
As seen in #49 the clean function doesn't seem to be necessary for the infer_en.py script. It causes the example test to raise ValueError: min() arg is an empty sequence in line 318.
I tried @backspacetg suggestion of changing re.sub(r'.{6} *', ".", word) to re.sub(r'\.{6} *', ".", word), but it error persist in the test example.
@jzq2000 or @tan-xu do you have any information on that?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the example test for infer_en.py and inspect the clean function around line 318, where min() receives an empty sequence. Compare the current regular expression with the attempted change and determine whether clean is needed. Done means the example test no longer raises ValueError and the intended infer_en.py behavior is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100