AdguardTeam / AdguardTeam/AGLint
Implement fuzzy string searching
- 主要語言
- TypeScript
- 星號
- 70
- 分支
- 4
- PR 合併指標
- 30 天內沒有已合併 PR
描述
There are cases where something is just misspelled, like the modifier name: `scipt` instead of `script`. In this case, the provided modifier name is very similar to the name of the original modifier. If we find an invalid modifier name, it might be worth doing a [fuzzy string searching](https://en.wikipedia.org/wiki/Approximate_string_matching) to find the correct modifier name from the set of known modifier names (spell checkers also use similar algorithms). Later, we may recommend this as an _optional fix_ via the suggestion API.
Possible use cases:
- modifier names
- CSS pseudo class names
- scriptlet names
- redirect names
- pre-processor directive names
- hints, platforms
- expression variable names in `!#if` comments
- domain TLDs
- etc.
References, links to check:
- https://en.wikipedia.org/wiki/Approximate_string_matching
- https://en.wikipedia.org/wiki/Levenshtein_distance
- https://github.com/EthanRutherford/fast-fuzzy
貢獻指南
評估
這個 Issue 還沒有評估資料。