urlchecker
A simple url checker for finding fraud url(s) or nearest url while being fast (threading)
A spell-checker based on the statistical algorithm described by Peter Norvig in http://norvig.com/spell-correct.html.
Usage requires a two-step process:
- Call
url.train()one or more times with a large text to train the language model - Call
url.correct(word)to retrieve the correction for the specified URL if it exists
Eg:-
use HashMap;
use URL;
Output:-
URL {
letters: "1234567890._-@abcdefghijklmnopqrstuvwxyz",
url_counts: {
"docs.rs": 2,
"doc.rust-lang.org": 1,
"norvig.com": 1,
},
}
Some(
"docs.rs",
)
Inspired from: