[−][src]Crate stringedits
stringedits contains the Edit trait, which provides access to a number of iterators for small edits to strings. Based off the article How to Write A Spelling Corrector by Peter Norvig. Available under the MIT license.
Usage:
"foo".dist1edits();
Structs
Deletions | Iterator over all the words formed from the delition of a single character from a word. See Edit::deletions |
Dist1Edits | Iterator over all the distance-1 edits of a word; deletion, insertion, or replacement of one character, or transposition of two characters. See Edit::dist1edits |
Dist2Edits | Iterator over all the distance-2 edits of a word; deletion, insertion, or replacement of one character, or transposition of two characters. See Edit::dist2edits |
Inserts | Iterator over all the words formed from the insertion of a letter in a...z in any position in a word, including before the first character and after the last see Edit::inserts |
Replaces | Iterator over all the words formed from the replacement of a character in a word with a letter in a...z see Edit::replaces |
Splits | Iterator over all the splits at a single position of a word. See Edit::splits |
Transposes | Iterator over all transpositions of a single position of a word. See Edit::transposes |
Traits
Edit | The Edit trait provides access to a number of iterators for single-and-double character edits of a string.
It is implemented for any type that implements |