Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/lingxz/poetrygen

chinese poetry generation using context free grammar
https://github.com/lingxz/poetrygen

chinese context-free-grammar poem poem-generator poetry

Last synced: about 2 months ago
JSON representation

chinese poetry generation using context free grammar

Awesome Lists containing this project

README

        

# A generator for context free grammar

- currently does not take into account repeated definitions, the second one will override the first.

## Usage

Takes a grammar file (examples see `grammars` folders)

Generating the `grammar.py` file
```sh
python gen.py -g grammars/poetry-ch.gram
```

Running the flask server
```
python main.py
```