Skip to main content

Graphs from Context-Free Grammars.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grammar_graph-0.2.0.tar.gz (53.3 kB view details)

Uploaded Source

Built Distribution

grammar_graph-0.2.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file grammar_graph-0.2.0.tar.gz.

File metadata

  • Download URL: grammar_graph-0.2.0.tar.gz
  • Upload date:
  • Size: 53.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for grammar_graph-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9e42ab94c9595791ac641568f94261697c7e82c573206a4d35e84e742fb54084
MD5 438bc104f180367518e14eb7f945c653
BLAKE2b-256 e5c82eae575c8706b10e778949bd528100f29ffaaef4e4dbb5b1ce0da3a7bbca

See more details on using hashes here.

File details

Details for the file grammar_graph-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for grammar_graph-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 025f9cdd96a122445ea38d79383d8b49bea0398d6f6249f2350439c0d82cece7
MD5 c5482c6380f9c28699c513fcbed4e070
BLAKE2b-256 c9c0b1de8aa8cfb7e020c47246be0447d1aecf88e518c42618271b56e0da34a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page