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: 5 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 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:53:35.000Z (almost 3 years ago)
- Last Synced: 2025-04-08T05:34:18.010Z (8 months ago)
- Topics: chinese, context-free-grammar, poem, poem-generator, poetry
- Language: Python
- Homepage: https://poetrygen.theconfused.me
- Size: 43.9 KB
- Stars: 6
- Watchers: 2
- 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
```