microsoft / microsoft/muzic

[Telemelody] BUG: clean function in infer_en.py causes the example test to raise ValueError

Open
#97 5 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.