Skip to content
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

Document Algorithms and Functions better #42

Open
Luro02 opened this issue Jan 2, 2020 · 1 comment
Open

Document Algorithms and Functions better #42

Luro02 opened this issue Jan 2, 2020 · 1 comment

Comments

@Luro02
Copy link

Luro02 commented Jan 2, 2020

I am having a hard time understanding what all those functions of this library are used for and which one I should use.

It would be good to have a broad explanation of the algorithm, it's uses and maybe a link to some resources, that explains it in further detail. Maybe also list the advantages and disadvantages?

You could also include some real world examples

For example, how could I improve this simple search function with strsim, to not only find exact matches, but also very similar matches;

fn search(list: Vec<&str>, value: &str) -> Option<&str> {
    for x in &list {
        if x == value {
             return Some(x);
        }
     }
     return None;
}

Maybe this could be useful https://medium.com/@appaloosastore/string-similarity-algorithms-compared-3f7b4d12f0ff

@maxbachmann
Copy link
Member

As a starting point for docs we can use the docs I have already written for rapidfuzz-rs here: https://docs.rs/rapidfuzz/latest/rapidfuzz/distance/index.html

The readme should probably guide people to either strsim, rapidfuzz or the reference implementation (once written) depending on the users requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants