|
|
|
@ -8,8 +8,10 @@ color_g:="\033[0;32m"
|
|
|
|
|
color_b:="\033[0;34m"
|
|
|
|
|
space:= $(empty) $(empty)
|
|
|
|
|
newline:= '\n'
|
|
|
|
|
listtxt:= $(subst $(space),$(newline),$(images))
|
|
|
|
|
listimgs:= $(subst $(space),$(newline),$(images))0
|
|
|
|
|
OS:= $(shell uname)
|
|
|
|
|
ocroutput:= ocr/output.txt
|
|
|
|
|
txtfiles:= $(wildcard ocr/*.txt)
|
|
|
|
|
# subst is a way to do string replacements, it works like this: $(subst $(delimitator),$(replacement),$(list))
|
|
|
|
|
# it's used here to make a list of the images, with one filename on each line
|
|
|
|
|
|
|
|
|
@ -28,22 +30,23 @@ dirs: # create the directories for the working structures
|
|
|
|
|
|
|
|
|
|
tesseract:
|
|
|
|
|
echo $(listtxt) > output/list.txt
|
|
|
|
|
tesseract output/list.txt output/plain
|
|
|
|
|
tesseract ocr/list.txt $(basename $(ocroutput))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
myscript: tesseract
|
|
|
|
|
cat output/plain.txt | python3 src/myscript.py > output/a-new-file.txt
|
|
|
|
|
cat $(outputocr) | python3 src/myscript.py > output/a-new-file.txt
|
|
|
|
|
|
|
|
|
|
wordtagger: tesseract
|
|
|
|
|
cat output/plain.txt | python3 src/wordtagger.py > output/tagged-words.txt
|
|
|
|
|
cat $(outputocr) | python3 src/wordtagger.py > output/tagged-words.txt
|
|
|
|
|
|
|
|
|
|
talktochatbot: tesseract
|
|
|
|
|
cat output/plain.txt | python3 src/textbotconversation.py
|
|
|
|
|
cat $(outputocr) | python3 src/textbotconversation.py
|
|
|
|
|
|
|
|
|
|
n+7: tesseract
|
|
|
|
|
cat output/plain.txt | python3 src/n_7.py > output/blah.txt
|
|
|
|
|
cat $(outputocr) | python3 src/n_7.py > output/blah.txt
|
|
|
|
|
|
|
|
|
|
n+7: tesseract
|
|
|
|
|
cat output/plain.txt | python3 src/n_7.py > output/blah.txt
|
|
|
|
|
cat $(outputocr) | python3 src/n_7.py > output/blah.txt
|
|
|
|
|
|
|
|
|
|
visualization: $(images) $(tmpfile) #requires mplayer
|
|
|
|
|
@echo $(tmpfile)
|
|
|
|
@ -63,3 +66,6 @@ endif
|
|
|
|
|
# ** Makefile Syntax notes **
|
|
|
|
|
# @ preceding command tells make not to print the command being executed
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
tts:
|
|
|
|
|
cat $(ocroutput) | espeak
|
|
|
|
|