Find out what are possibilities to create a meme by crossing-out letters from text on image.
A part of text-blackout meme series.
| Not funny | Funny |
|---|---|
slangs.txt contains sample phrases web-crawled from polish slang dictionary used to check their presence in ordered input string provided to python script.
Python 3.X
$ python setup.py installInstall tesseract
tl;dr
Linux
$ sudo apt install tesseract-ocr
$ sudo apt install libtesseract-dev MacOS
$ brew install tesseractWindows
- Create
config.jsonfile in main folder with content presented in config.example.json file - Download EXE here
- Specify path to
tesseractexecutable installed in config.json
Image available at https://hub.docker.com/repository/docker/hvvka/text-blackout-memes
$ docker build -t memes_image .
$ docker run -it --name memes_container memes_imageChecks input string for a given file with dictionary words and outputs those which are present in string + their positions.
I.e. default_string in find_words.py for given slangs.txt outputs output.txt.
3 arguments are possible, but optional:
-
--input – input string provided from image, default:
wałpzwpowodzoadinisttojewódzkizarządmelioracjiiurządzeńwodnywrocławulmatejki5aazrozkopywaniawbijanisszkadzaadarninyiinnychnpodstaapaez -
--dict – file with dictionary words, default:
resources/slangs.txt -
--out – output file, default:
resources/output.txt
If dictionary file is not present, then it uses polish_slang_crawler script to fetch words. The script can we modified to use different source.
Use output file to find the most suitable phrase and modify the image manually.
Manual image modification is not required with this one.
- Run image_anaylzer.py and wait for gigabytes of data with mentzen memes