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

Provide API to tune the balancing factors used in conversion #503

Open
kanru opened this issue Apr 28, 2024 · 0 comments
Open

Provide API to tune the balancing factors used in conversion #503

kanru opened this issue Apr 28, 2024 · 0 comments
Labels
Milestone

Comments

@kanru
Copy link
Member

kanru commented Apr 28, 2024

Is your feature request related to a problem? Please describe.

酷音的「注音→詞」轉換引擎有一組規則用來計算最佳的斷詞方式

let mut score = 0;
score += 1000 * self.rule_largest_sum();
score += 1000 * self.rule_largest_avgwordlen();
score += 100 * self.rule_smallest_lenvariance();
score += self.rule_largest_freqsum();
score

這些權重應該要是可以調整的。

Describe the solution you'd like

提供 API 讓進階使用者可以預覽並調整權重

Describe alternatives you've considered

Use environment variable or config files.

@kanru kanru added the feature label Apr 28, 2024
@kanru kanru added this to the v0.9.0 milestone Apr 28, 2024
@kanru kanru modified the milestones: v0.9.0, v0.10.0 Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant