Penman
PENMAN notation for graphs (e.g., AMR)
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 on this page — 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
penman on PyPI
pip
pip install penmanuv
uv add penmanpoetry
poetry add penmanInstalling 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 the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 737 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,523/month — #13,990 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: penman-1.3.1-py3-none-any.whl
Keywords: amr, nlp, semantics
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
objectgraphObjectgraph provides a Python class for…
permissive · top 15,000 on PyPI
jraphJraph provides data structures and utilities…
permissive · top 15,000 on PyPI
scikit-networkscikit-network provides graph algorithms and…
permissive · top 5,000 on PyPI
graphttyRenders directed graphs as colored ASCII art in…
permissive · top 15,000 on PyPI
nltkNLTK is a Python library for natural language…
permissive · top 1,000 on PyPI
langchain-graph-retrieverRetrieves documents from a graph structure…
permissive · top 15,000 on PyPI
DijkstarDijkstar implements Dijkstra's shortest-path…
permissive · top 15,000 on PyPI
markdown-graphviz-inlineA Markdown extension that converts inline…
permissive · top 15,000 on PyPI
onnx-ironnx-ir provides an in-memory intermediate…
permissive · top 5,000 on PyPI
markdown-inline-graphviz-extensionA Markdown extension that converts inline…
permissive · top 15,000 on PyPI