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
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 --no-browser
How to use
from tptp_lark_parser.tptp_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.4.tar.gz
(28.6 kB
view hashes)
Built Distribution
Close
Hashes for tptp_lark_parser-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bac138d88b9599d23824d0246bb31ad9317c1ca2d416fb761f749bfd1946518f |
|
MD5 | c56fffd38654ec8f23bdd8bfddd54508 |
|
BLAKE2b-256 | e362d0f7a88a4a470ce68e9f021f8f283b062603deb40349c0c3557a943b8835 |