Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lingxz/poetrygen
- Owner: lingxz
- Created: 2018-06-11T04:15:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:53:35.000Z (about 2 years ago)
- Last Synced: 2023-08-07T08:21:10.228Z (over 1 year ago)
- Topics: chinese, context-free-grammar, poem, poem-generator, poetry
- Language: Python
- Homepage: https://poetrygen.theconfused.me
- Size: 43.9 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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
```