{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/16"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/9"}],"enrichment":{"capability":"Pygmars builds lightweight lexers and parsers using regular expressions, transforming text into labeled tokens and parse trees. It integrates with Pygments lexers to enable grammar-based parsing of many programming languages.","skillfed_tags":["parsing","lexing","regex-grammar"],"use_cases":["Parse copyright and author statements from source files by building grammars on top of existing Pygments lexers.","Extract metadata (such as dependencies) from package manifest files using lightweight regex-based grammar rules.","Build simple domain-specific language parsers without the overhead of a full NLP framework.","Tokenize and label text in programming languages supported by Pygments, then apply lightweight grammar-based analysis.","Integrate lexing and parsing into tools that need lightweight language understanding without external dependencies."],"what_it_does":"Pygmars is a lightweight lexing and parsing library that builds on simplified, remixed code from NLTK's regex-based tagging and chunking. It transforms sequences of text into labeled Token objects (assigning labels, tracking position and line number), then applies regular-expression-based grammar rules to recognize token sequences and build a parse tree. Each rule has a left-hand side label (non-terminal) and a right-hand side pattern over token labels.\n\nThe library is designed for cases where NLTK is overkill\u2014it has no dependencies, a small footprint, and integrates with Pygments lexers to enable lightweight parsing of many programming languages. It was originally built to parse copyright statements in ScanCode Toolkit and is now used for extracting metadata from package manifests and other lightweight language parsing tasks where a full NLP toolkit is unnecessary.","worth_installing":"Yes, if you need lightweight regex-based lexing and parsing without dependencies. The library is stable and permissively licensed, but maintenance is aging (394 days since last release). Install it for copyright detection, manifest parsing, or simple DSL parsing; avoid it if you need active upstream development or support for complex recursive grammars."},"id":"pygmars","links":{"html":"https://skillfed.io/packages/pygmars","md":"https://skillfed.io/packages/pygmars.md","pypi":"https://pypi.org/project/pygmars/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-07-16","license_spdx":null,"license_treatment":"permissive","name":"pygmars","python_support":"supports_current","summary":"Craft simple regex-based small language lexers and parsers. Build parsers from grammars and accept Pygments lexers as an input. Derived from NLTK."},"popularity":{"monthly_downloads":123835,"position":11898,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.0"}
