Skip to content

Latest commit

 

History

History
86 lines (52 loc) · 2.67 KB

README.md

File metadata and controls

86 lines (52 loc) · 2.67 KB

text-blackout-memes

Build Status

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
boring haha

slangs.txt contains sample phrases web-crawled from polish slang dictionary used to check their presence in ordered input string provided to python script.

Requirements

Python 3.X

$ python setup.py install

Pytesseract installation

Install tesseract

tl;dr

Linux

$ sudo apt install tesseract-ocr
$ sudo apt install libtesseract-dev 

MacOS

$ brew install tesseract

Windows

  • Create config.json file in main folder with content presented in config.example.json file
  • Download EXE here
  • Specify path to tesseract executable installed in config.json

Using Docker

Image available at https://hub.docker.com/repository/docker/hvvka/text-blackout-memes

Build locally

$ docker build -t memes_image .
$ docker run -it --name memes_container memes_image

Usage notes

Checks 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.

  1. Run image_anaylzer.py and wait for gigabytes of data with mentzen memes