--- id: penman version: "1.3.1" license: unclear license_treatment: permissive maintenance: active --- # Penman — PENMAN notation for graphs (e.g., AMR) License: permissive · Maintenance: active · Downloads: 84.5K/mo ## What it is and what it does Penman models graphs in PENMAN notation—a text format for representing semantic structures like Abstract Meaning Representation (AMR). It provides a parser to convert PENMAN strings into graph objects, inspection and manipulation methods for the underlying triples and edges, and a serializer to write graphs back to PENMAN format with customizable formatting. The library also includes an AMR model with role inventory and graph transformations (reification, canonicalization, etc.), plus a command-line tool for non-Python workflows. You use it when you need to work with semantic graph data in PENMAN format: reading annotated AMR corpora, programmatically building or modifying semantic graphs, validating graphs against a model, or converting between different graph representations. It handles metadata in comments and surface alignments, and lets you restructure graphs before serialization—adjusting indentation, selecting different root nodes, or relabeling variables. Use it for: - Parse AMR corpora or PENMAN-formatted semantic graphs for NLP research or downstream semantic tasks. - Build or programmatically modify semantic graphs and serialize them back to PENMAN notation for annotation pipelines. - Validate semantic graphs against the AMR model and apply graph transformations like reification or role canonicalization. - Convert between graph representations (triples, edges, tree structures) for analysis or integration with other semantic tools. - Use the command-line tool to inspect, reformat, or transform PENMAN files without writing Python code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Penman is a Python library for reading, writing, and manipulating graphs encoded in PENMAN notation, commonly used for Abstract Meaning Representation (AMR) and other semantic graph formats. Yes. Penman is a stable, well-maintained library with no dependencies, permissive licensing, and active repository support. It fills a clear need for anyone working with PENMAN-formatted semantic graphs, especially in NLP and AMR research. The recent commit history confirms ongoing maintenance. ## Install pip install penman uv add penman poetry add penman ## Installing Penman Before you install: Low friction installation with no runtime dependencies. The package is actively maintained with recent commits and supports modern Python versions (3.8, 3.9, 3.10, 3.11, 3.12). License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions. Quickstart: pip install penman import penman g = penman.decode('(b / bark-01 :ARG0 (d / dog))') print(penman.encode(g, indent=3)) Verify before relying: - Whether the 737 days since last release reflects a stable, feature-complete state or potential staleness for active development. - Real-world performance characteristics when working with large or deeply nested PENMAN graphs. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 84.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags PENMAN graph notation parser, AMR abstract meaning representation, semantic graph manipulation, NLP graph serialization, PENMAN encode decode, graph triple representation, linguistic semantic graphs, amr, semantic-graphs, nlp [View on SkillFed](https://skillfed.io/packages/penman) · [View on PyPI](https://pypi.org/project/penman/)