{"id":27943,"library":"matcher-py","title":"matcher-py","description":"A high-performance matcher designed to solve LOGICAL and TEXT VARIATIONS problems in word matching, implemented in Rust. v0.15.5, actively maintained.","status":"active","version":"0.15.5","language":"python","source_language":"en","source_url":"https://github.com/Lips7/Matcher","tags":["matcher","word-matching","text-variations","rust","nlp"],"install":[{"cmd":"pip install matcher-py","lang":"bash","label":"Latest release"}],"dependencies":[],"imports":[{"note":"Correct import uses 'matcher' (the module name), not 'matcher_py'.","wrong":"from matcher_py import Matcher","symbol":"Matcher","correct":"from matcher import Matcher"}],"quickstart":{"code":"from matcher import Matcher\n\n# Initialize matcher with a list of patterns\npatterns = [\"hello\", \"world\", \"python\"]\nmatcher = Matcher(patterns)\n\n# Match a single text\nresult = matcher.match(\"hello world\")\nprint(result)  # Output: ['hello', 'world']","lang":"python","description":"Basic usage: create a Matcher with a list of strings and call .match() to get matched patterns."},"warnings":[{"fix":"Upgrade code: replace old initialization with `Matcher([...])`.","message":"In v0.15.x the API changed: 'Matcher' constructor now expects a list of strings instead of previous dict/list-of-dicts.","severity":"breaking","affected_versions":"<0.15.0"},{"fix":"Use `Matcher(patterns, case_sensitive=False)`.","message":"Pattern matching is case-sensitive by default. To enable case-insensitive matching, set `case_sensitive=False` when creating Matcher.","severity":"gotcha","affected_versions":"all"},{"fix":"Escape special characters yourself or use raw strings to avoid confusion.","message":"If a pattern contains special regex characters (e.g., '.', '*'), they are treated as literal characters, not regex. This may cause unexpected no-match results.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with 'pip install matcher-py' and import with 'from matcher import Matcher'.","cause":"The library is installed as 'matcher-py' but imported as 'matcher'.","error":"ModuleNotFoundError: No module named 'matcher'"},{"fix":"Correct: `Matcher(['pattern1', 'pattern2'])`.","cause":"Incorrect API usage: Matcher expects positional argument, not keyword.","error":"TypeError: Matcher() got an unexpected keyword argument 'patterns'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}