{"id":16590037,"url":"https://github.com/loichyan/noodler","last_synced_at":"2025-03-06T12:27:53.093Z","repository":{"id":152622666,"uuid":"623367022","full_name":"loichyan/noodler","owner":"loichyan","description":"🍜 A port of python-ngram provides fuzzy search using N-gram","archived":false,"fork":false,"pushed_at":"2023-04-11T11:31:23.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T06:54:50.564Z","etag":null,"topics":["ngrams","rust","search","text-processing"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/noodler","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loichyan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-04T08:24:39.000Z","updated_at":"2024-11-03T09:18:24.000Z","dependencies_parsed_at":"2023-08-20T01:48:13.363Z","dependency_job_id":null,"html_url":"https://github.com/loichyan/noodler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loichyan%2Fnoodler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loichyan%2Fnoodler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loichyan%2Fnoodler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loichyan%2Fnoodler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loichyan","download_url":"https://codeload.github.com/loichyan/noodler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242209198,"owners_count":20089859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ngrams","rust","search","text-processing"],"created_at":"2024-10-11T23:10:45.539Z","updated_at":"2025-03-06T12:27:53.069Z","avatar_url":"https://github.com/loichyan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍜 Noodler\n\n\u003e In computer science, \"noodler\" is used to describe programs that handle text.\n\u003e Because algorithms like n-grams are typically used to extract information from\n\u003e text, similar to pulling strands of noodles out of a pile of dough, \"noodler\"\n\u003e can be associated with algorithms that extract information from text because\n\u003e they can be seen as \"processing\" programs for text, just as noodle makers\n\u003e \"produce\" noodles from dough.\n\u003e\n\u003e _ChatGPT_\n\nA port of the [python-ngram](https://github.com/gpoulter/python-ngram) project\nthat provides fuzzy search using [N-gram](https://en.wikipedia.org/wiki/N-gram).\n\n## ✍️ Example\n\n```rust\nuse noodler::NGram;\n\nlet ngram = NGram::\u003c\u0026str\u003e::builder()\n    .arity(2)\n    .warp(3.0)\n    .threshold(0.75)\n    .build()\n    // Feed with known words\n    .fill(vec![\"pie\", \"animal\", \"tomato\", \"seven\", \"carbon\"]);\n\n// Try an unknown/misspelled word, and find a similar match\nlet word = \"tomacco\";\nlet top = ngram.search_sorted(word).next();\nif let Some((text, similarity)) = top {\n    if similarity \u003e 0.99 {\n        println!(\"✔ {}\", text);\n    } else {\n        println!(\n            \"❓{} (did you mean {}? [{:.0}% match])\",\n            word,\n            text,\n            similarity * 100.0\n        );\n    }\n} else {\n    println!(\"🗙 {}\", word);\n}\n```\n\n## 💭 Inspired by\n\nPlease check out these awesome works that helped a lot in the creation of\nnoodler:\n\n- [python-ngram](https://github.com/gpoulter/python-ngram): Set that supports\n  searching by ngram similarity.\n- [ngrammatic](https://github.com/compenguy/ngrammatic): A rust crate providing\n  fuzzy search/string matching using N-grams.\n\n## 🚩 Minimal supported Rust version\n\nAll tests passed with `rustc v1.41`, earlier versions may not compile.\n\n## ⚖️ License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floichyan%2Fnoodler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floichyan%2Fnoodler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floichyan%2Fnoodler/lists"}