-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat: add load_default_dict, clear, has_word, remove_word methods #118
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 84.79% 85.24% +0.45%
==========================================
Files 9 9
Lines 2045 2108 +63
==========================================
+ Hits 1734 1797 +63
Misses 311 311 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #118 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (5)
src/lib.rs:370
- The code for updating the longest word length is commented out. This might cause the longest word length to be incorrect after removing a word. Consider uncommenting and ensuring the logic is correct.
// let word_len = word.chars().count();
src/lib.rs:286
- Ensure that the
clear
method is covered by tests to verify that it correctly clears all data.
pub fn clear(&mut self) {
src/lib.rs:314
- Ensure that the
load_default_dict
method is covered by tests to verify that it correctly loads the default dictionary.
pub fn load_default_dict(&mut self) {
src/lib.rs:330
- Ensure that the
has_word
method is covered by tests to verify that it correctly checks for the existence of a word.
pub fn has_word(&self, word: &str) -> bool {
src/lib.rs:361
- Ensure that the
remove_word
method is covered by tests to verify that it correctly removes a word and updates the total frequency.
pub fn remove_word(&mut self, word: &str) -> bool {
fix: remove_word for word_id max len
|
Thanks for the PR, I've manually merged changes from this PR into |
How about fixing the default dict file instead for now?Sent from my iPhoneOn Jan 22, 2025, at 08:29, Riceball LEE ***@***.***> wrote:
@messense
BTW: the remove_word has its usage scenarios, for example, there is an error word (今天天气) in the default dictionary and you need to remove it.
Oh I just saw the issue #114 now.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
It's too hard. It'll take a lot of time to proofread the words one by one. Maybe you can use the AI to correct some. But maybe the #114' is another story. |
No description provided.