Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayushshahh/crossword-maker-ai
Given a set of words and structure, it will generate a possible crossword
https://github.com/ayushshahh/crossword-maker-ai
Last synced: 15 days ago
JSON representation
Given a set of words and structure, it will generate a possible crossword
- Host: GitHub
- URL: https://github.com/ayushshahh/crossword-maker-ai
- Owner: AyushShahh
- Created: 2023-08-17T07:07:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-17T07:07:42.000Z (over 1 year ago)
- Last Synced: 2024-10-18T21:09:09.722Z (2 months ago)
- Language: Python
- Size: 221 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crossword Maker AI
Given a set of words and structure, it will generate a possible crossword.```
$ python generate.py data/structure3.txt data/words2.txt output.png
█████████████████████████
█████████████████████████
█████████████████████████
█SOPHISTICATED██RESPECT██
█Q██O██H█O█U█E███P█A█O███
█U██W██E█R█B█S██DISTANT██
█ENTERTAINMENT███S█I█C███
█E██V██T██E██R██FOREVER██
█Z██E██E██A██O███D█N█R███
█EXTRAORDINARY██MEETING██
█████IN█████U███R████████
█████ME█████BASIS████████
████A██N██████T██████████
████SIDE██████R██████████
████I██R██████I██████████
████A██V██████K██████████
████N██E████CLEAR████████
█████████████████████████
█████████████████████████
█████████████████████████
```![](output.png)
Usage:
```
$ python generate.py structure words [output]
```- structure: path to the structure text file
- words: path to the words text file
- [output]: name of the output png file (optional). If not specified, it will only print crossword to terminalExample structure file:
```
##############
#######_####_#
#____________#
#_#####_####_#
#_##_____###_#
#_#####_####_#
#_###______#_#
#######_####_#
##############
```_ represents an empty box where a letter needs to be placed, # represents solid blocks.
words text file should contain each word on a new line.