We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/huacnlee/autocorrect/blob/main/autocorrect/src/spellcheck.rs
I encountered some confusion when using spellcheck。 The configuration file
spellcheck: # 0 - Disabled, 1 - Format and Lint, 2 - LintOnly mode: 1 # Correct Words (Case insensitive) for by Spellcheck words: - 土豆=番茄
code
use autocorrect::{Config}; static DEFAULT_CONFIG_FILE: &str = "./.autocorrectrc"; fn main() { load_config(DEFAULT_CONFIG_FILE); println!("{}", spellcheck("土豆 土豆 土豆 土豆 土豆 土豆")); } pub fn load_config(config_file: &str) -> Config { return autocorrect::config::load_file(config_file).unwrap(); }
From my point of view, all potatoes should be replaced with tomatoes
But the output is ”番茄 土豆 番茄 土豆 番茄 土豆“
pub(crate) fn word_regexp(word: &str) -> Regex { let prefix = r#"([^\W]|[\p{Han}?!:,。;、]|$|^)"#; regexp!( r#"(?im){}([\s?!:,。;、]|^)+({})([\s?!:,。;、]|$)+{}"#, prefix, word.replace('-', r"\-").replace('.', r"\."), prefix ) }
I'm not sure what this rule does exactly, can a friend explain it?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/huacnlee/autocorrect/blob/main/autocorrect/src/spellcheck.rs
I encountered some confusion when using spellcheck。
The configuration file
code
From my point of view, all potatoes should be replaced with tomatoes
But the output is ”番茄 土豆 番茄 土豆 番茄 土豆“
I'm not sure what this rule does exactly, can a friend explain it?
The text was updated successfully, but these errors were encountered: