Skip to main content

A TPTP parser using Lark

Project description

BinderPyPI versionAnacondaCircleCIAppveyorCIDocumentation Statuscodecov

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


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)

Uploaded Source

Built Distribution

tptp_lark_parser-0.0.8-py3-none-any.whl (60.6 kB view hashes)

Uploaded Python 3

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