apply_typo_corrections

Function apply_typo_corrections 

Source
pub fn apply_typo_corrections(suggestion: &str) -> String
Expand description

Apply common typo corrections to a suggestion.

This helps when the model has learned typos from actual history.

ยงExample

use aprender_shell::quality::apply_typo_corrections;

assert_eq!(apply_typo_corrections("git stauts"), "git status");
assert_eq!(apply_typo_corrections("dokcer ps"), "docker ps");