Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dewantrie/lark-grammar-parser

A simple programming language designed for studying parsing and how to use lark-parser in specific scenarios for a particular case.
https://github.com/dewantrie/lark-grammar-parser

antlr grammer lark-parser named-entity-recognition parser string-parser

Last synced: 28 days ago
JSON representation

A simple programming language designed for studying parsing and how to use lark-parser in specific scenarios for a particular case.

Awesome Lists containing this project

README

        

# Tutorial Lark Parser

Example usage of the [Lark Parser](https://github.com/lark-parser/lark)

## Guides
From the project directory, run the following:
```
conda create -n py310 python=3.10
conda activate py310
pip install lark-parser
python app.py
```
Input
```
i have two cars: a red honda brio and a white honda jazz
```
Output
```
{'data': [{'unknown': 'i'}, {'unknown': 'have'}, {'unknown': 'two'}, {'unknown': 'cars:'}, {'unknown': 'a'}, {'color': 'red'}, {'brand': 'honda'}, {'model': 'brio'}, {'unknown': 'and'}, {'unknown': 'a'}, {'color': 'white'}, {'brand': 'honda'}, {'model': 'jazz'}]}
```