{"id":15014190,"url":"https://github.com/inanyan/spacy_pat_match_dsl","last_synced_at":"2026-02-12T10:33:48.786Z","repository":{"id":210699760,"uuid":"726968748","full_name":"InAnYan/spacy_pat_match_dsl","owner":"InAnYan","description":"A simple DSL for creating spaCy pattern matchers","archived":false,"fork":false,"pushed_at":"2025-02-11T15:33:37.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-29T16:11:09.914Z","etag":null,"topics":["dsl","nlp","python","spacy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InAnYan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-03T22:26:29.000Z","updated_at":"2025-02-11T15:33:41.000Z","dependencies_parsed_at":"2023-12-12T21:50:13.761Z","dependency_job_id":null,"html_url":"https://github.com/InAnYan/spacy_pat_match_dsl","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"46fc981ca2cbae81ac1789d033b6087c030c4293"},"previous_names":["inanyan/spacy_pat_match_dsl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InAnYan/spacy_pat_match_dsl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2Fspacy_pat_match_dsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2Fspacy_pat_match_dsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2Fspacy_pat_match_dsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2Fspacy_pat_match_dsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InAnYan","download_url":"https://codeload.github.com/InAnYan/spacy_pat_match_dsl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2Fspacy_pat_match_dsl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dsl","nlp","python","spacy"],"created_at":"2024-09-24T19:45:18.482Z","updated_at":"2026-02-12T10:33:48.771Z","avatar_url":"https://github.com/InAnYan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple DSL for creating spaCy pattern matchers\n\n```python\nclass Example(PatternsGrammar):\n    single_unit = lower('meters') | lower('second') | lower('kilometers') | lower('hour')\n    compound_unit = single_unit + lower('per') + single_unit\n\t\n    UNIT = single_unit | compound_unit\n    QUANTITY = pos('NUM') + UNIT\n```\n\nIn this text:\n\n```plain\nThe car is traveling at a speed of 108 kilometers per hour. Represent this speed in meters per second.\n```\n\nThese entities wil be recognized:\n\n- `108 kilometers per hour` - `QUANTITY`.\n- `meters per second` - `UNIT`.\n\nhttps://pypi.org/project/spacy-pat-match-dsl/\n\n## Features\n\n- Allows for easier constructing and extending of rule-based NER (Named Entity Recognition) systems.\n- Supports many common modifiers such as: `lower` (lowercase form), `pos` (part-of-speech), `lemma` (lemmatized word).\n- You can also generate BNF (Backus-Naur form) of the patterns for use in documentation or scientific papers.\n\n## How to Run this Project\n\nThis project is a library, intended to used in other projects.\n\nSee [the example script](examples/example.py) for details on usage.\n\nAlso see documentation in [the source code](src/spacy_pat_match_dsl/dsl.py) for all capabilities of this project.\n\n## How this Project is Implemented\n\nThis project is inspired by [lrparsing](https://pypi.org/project/lrparsing/).\n\n- Patterns are represented via special classes.\n- These classes have method `generate_patterns` which generates `spaCy`-native datastructre for NER patterns.\n- `PatternGrammar` reads its own static variables and collects all the patterns.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finanyan%2Fspacy_pat_match_dsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finanyan%2Fspacy_pat_match_dsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finanyan%2Fspacy_pat_match_dsl/lists"}