python cli program to convert latex input to CNF (conjuctive normal form).
Reason this release was yanked:
There was a bug in CNF algorithm and bad output format.
Project description
██╗ █████╗ ████████╗███████╗██╗ ██╗████████╗ ██████╗ ██████╗███╗ ██╗███████╗ ██║ ██╔══██╗╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝██╔═══██╗██╔════╝████╗ ██║██╔════╝ ██║ ███████║ ██║ █████╗ ╚███╔╝ ██║ ██║ ██║██║ ██╔██╗ ██║█████╗ ██║ ██╔══██║ ██║ ██╔══╝ ██╔██╗ ██║ ██║ ██║██║ ██║╚██╗██║██╔══╝ ███████╗██║ ██║ ██║ ███████╗██╔╝ ██╗ ██║ ╚██████╔╝╚██████╗██║ ╚████║██║ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚═╝ ╚═══╝╚═╝
python cli to convert latex input to CNF(Conjuctive Normal Form).
Installation
pip install this repo. (Note: Incompatible with Python 2.x)
pip3 install LatexToCNF
Usage example
To get help with commandline arguments
LatexToCNF --help
Using Command-line Arguments
LatexToCNF -f "/path/to/folder/myinput.tex"
(or)
LatexToCNF -f "/path/to/folder/myinput.txt"
(or)
LatexToCNf --filepath "/path/to/folder/myinput.tex"
(or)
LatexToCNF --filepath "/path/to/folder/myinput.txt"
Sample input file
myinput.tex
\neg \neg p
\neg p \wedge q \rightarrow p \wedge (r \rightarrow q)
r \rightarrow (s \rightarrow (t \wedge s \rightarrow r))
myinput.text
\neg \neg p
\neg p \wedge q \rightarrow p \wedge (r \rightarrow q)
r \rightarrow (s \rightarrow (t \wedge s \rightarrow r))
output
line-1: p
line-2: [['p', '\\vee', ['\\neg', 'q']], '\\vee', ['p', '\\wedge', [['\\neg', 'r'], '\\vee', 'q']]]
line-3: [['\\neg', 'r'], '\\vee', [['\\neg', 's'], '\\vee', [[['\\neg', 't'], '\\vee', ['\\neg', 's']], '\\vee', 'r']]]
Meta
Azgmohammadd – azgmohammadd@gmail.com
Distributed under the MIT license. See LICENSE
for more information.
https://github.com/azgmohammadd
Contributing
- Fork it (https://github.com/azgmohammadd/azgmohammadd/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
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
LatexToCNF-0.1.2.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for LatexToCNF-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e857bccde320bd60c326b962d0939e389d107a85bdbe663f5279efc5df1e5838 |
|
MD5 | fc7d57983f6db3a3a55874d590527ff8 |
|
BLAKE2b-256 | 7f34ed5180138d84f40c8e6c6c0af6dbf580260a6487a8272bdd4d68c8cde7b6 |