Skip to main content

GrammarGraph

Creating graphs from context-free grammars for fun and profit.

Features

  • Creating sub graphs
  • Export back to grammars
  • Reachability
  • Filter abstraction
  • Dijkstra's algorithm for shortest paths between nodes
  • Checking whether a (sub) graph represents a tree
  • Computing k-paths (paths of exactly length k) in grammars and derivation trees, and a k-path coverage measure (see this paper) of derivation trees based on that.

Have a look at our feature demo!

Install

GrammarGraph requires at least Python 3.9.

We recommend to install GrammarGraph in a virtual environment. Example usage (inside project directory):

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run tests
python3 -m pytest -n 16

Author: Dominic Steinhöfel.

Metadata

Release files for grammar-graph 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grammar-graph 0.2.0
File Size Uploaded Provenance
grammar_graph-0.2.0.tar.gz 53.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for grammar-graph 0.2.0
File Interpreter ABI Platform
grammar_graph-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 90.4 kB

Release files / grammar_graph-0.2.0.tar.gz

Download URL grammar_graph-0.2.0.tar.gz
Size 53.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9e42ab94c9595791ac641568f94261697c7e82c573206a4d35e84e742fb54084
BLAKE2b-256 checksum
How to use checksums
e5c82eae575c8706b10e778949bd528100f29ffaaef4e4dbb5b1ce0da3a7bbca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / grammar_graph-0.2.0-py3-none-any.whl

Download URL grammar_graph-0.2.0-py3-none-any.whl
Size 37.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
025f9cdd96a122445ea38d79383d8b49bea0398d6f6249f2350439c0d82cece7
BLAKE2b-256 checksum
How to use checksums
c9c0b1de8aa8cfb7e020c47246be0447d1aecf88e518c42618271b56e0da34a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for grammar-graph 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page