Skip to content

Inaccurate Tone Adjustment in tone_sandi #4

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

Open
1 task
apinge opened this issue Oct 12, 2024 · 0 comments
Open
1 task

Inaccurate Tone Adjustment in tone_sandi #4

apinge opened this issue Oct 12, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@apinge
Copy link
Owner

apinge commented Oct 12, 2024

In python version, tone_sandhi is used to adjust Chinese character's segmentations and tones. This issue is to address the inaccuracies in tones in the original Python version. We can both resolve it directly in our C++ version or submit PRs to the original repo.

  • "地" as noun
    e.g. "大地" in “温暖的太阳照耀着大地”
    related code snippet (in _neural_sandhi)
elif len(word) >= 1 and word[-1] in "的地得":
            finals[-1] = finals[-1][:-1] + "5"

Possible Change:

elif len(word) >= 1 and word[-1] in "的地得" and pos[0] != 'n':
            finals[-1] = finals[-1][:-1] + "5"
@apinge apinge added bug Something isn't working enhancement New feature or request labels Oct 12, 2024
@apinge apinge changed the title Inaccurate Tone Adjustment in tonesandi Inaccurate Tone Adjustment in tone_sandi Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant