https://github.com/dodaro/cnl2asp
A tool for converting CNL sentences to ASP rules.
https://github.com/dodaro/cnl2asp
answer-set-programming controlled-natural-language
Last synced: 10 days ago
JSON representation
A tool for converting CNL sentences to ASP rules.
- Host: GitHub
- URL: https://github.com/dodaro/cnl2asp
- Owner: dodaro
- License: apache-2.0
- Created: 2022-05-04T16:36:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-06T08:57:56.000Z (3 months ago)
- Last Synced: 2026-01-14T00:02:49.568Z (13 days ago)
- Topics: answer-set-programming, controlled-natural-language
- Language: Python
- Homepage: https://dodaro.github.io/cnl2asp/
- Size: 758 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cnl2asp
Cnl2asp is a tool for converting Controlled Natural Language sentences into Answer Set Programming.
## Install cnl2asp
`pip install cnl2asp`
### Dependencies
- lark
- inflect
## Usage
`cnl2asp input_file [output_file]`
You can also run cnl2asp from source using the following command:
`python3 src/main.py input_file [output_file]`
If output_file is not provided, the output is printed in stdout.
## Web Interface
You can run CNL2ASP directly in your browser using the following link:
https://cnl2asp.streamlit.app/
## Documentation
https://dodaro.github.io/cnl2asp/getting_start.html
## Citing
S. Caruso, C. Dodaro, M. Maratea, M. Mochi, F. Riccio - [CNL2ASP: Converting Controlled Natural
Language Sentences into ASP](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/AF5901FADC579E49C583CFD5A10C0192/S1471068423000388a.pdf/div-class-title-cnl2asp-converting-controlled-natural-language-sentences-into-asp-div.pdf). Theory and Practice of Logic Programming. Vol. 24(2), pages 196–226, 2024.