A TPTP parser using Lark
Project description
tptp-lark-parser
tptp-lark-parser is an parser for the TPTP library language using the Lark parser.
How to Install
The best way to install this package is to use pip:
pip install tptp-lark-parser
The package is also available on conda-forge:
conda install -c conda-forge tptp-lark-parser
One can also run it in a Docker container:
docker build -t tptp-lark-parser https://github.com/inpefess/tptp-lark-parser.git
docker run -it --rm -p 8888:8888 tptp-lark-parser jupyter-lab --ip=0.0.0.0 --port=8888
How to use
from tptp_lark_parser import TPTPParser
tptp_parser = TPTPParser()
parsed_text = tptp_parser.parse("cnf(test, axiom, ~ p(Y, X) | q(X, Y)).")
clause_literals = parsed_text[0].literals
See the notebook or run it in Binder for more information.
How to Contribute
Pull requests are welcome. To start:
git clone https://github.com/inpefess/tptp-lark-parser
cd tptp-lark-parser
# activate python virtual environment with Python 3.7+
pip install -U pip
pip install -U setuptools wheel poetry
poetry install
# recommended but not necessary
pre-commit install
To check the code quality before creating a pull request, one might run the script local-build.sh. It locally does nearly the same as the CI pipeline after the PR is created.
Reporting issues or problems with the software
Questions and bug reports are welcome on the tracker.
More documentation
More documentation can be found here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tptp-lark-parser-0.0.8.tar.gz
(58.7 kB
view hashes)
Built Distribution
Close
Hashes for tptp_lark_parser-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecd4aba4e5081149a377149a3dab23a683ede8f100bc5f520e9bcbe8c3f94de1 |
|
MD5 | daa9b8cc0ee4535554d30123b11f40bd |
|
BLAKE2b-256 | 27c0517ecffaa8b7873724b14b5f4b00da0ee5302cb1f27d1d66d4c71b1901f1 |