added desc in makefile

master
jvdhorst 7 years ago
parent b490da671a
commit 073f17ffa9

@ -53,18 +53,18 @@ ocr/output.txt: ## ocr with tesseract
#OUTPUT GENERATION RECIPES #OUTPUT GENERATION RECIPES
output/tagged-words.txt: ocr/output.txt ## DESCRIBE WHAT IT DOES. Dependecies: python3's nltk, nltk's averaged_perceptron_tagger output/tagged-words.txt: ocr/output.txt ## Analyzes OCR'ed text using a Part of Speech (POS) tagger. Outputs a string of tags (e.g. nouns, verbs, adjectives, and adverbs). Dependencies: python3's nltk, nltk's averaged_perceptron_tagger
cat $< | python3 src/wordtagger.py > $(@) cat $< | python3 src/wordtagger.py > $(@)
# install nltk's 'averaged_perceptron_tagger': # install nltk's 'averaged_perceptron_tagger':
# $ python 3 # $ python 3
# >>> import nltk # >>> import nltk
# >>> nltk.download('averaged_perceptron_tagger') # >>> nltk.download('averaged_perceptron_tagger')
output/chatbot.txt: ocr/output.txt ## DESCRIBE WHAT IT DOES. Dependecies: python3's chatterbot output/chatbot.txt: ocr/output.txt ## DESCRIBE WHAT IT DOES. Dependencies: python3's chatterbot
cat $< | python3 src/textbotconversation.py $(@) cat $< | python3 src/textbotconversation.py $(@)
output/n7.txt: ocr/output.txt ## DESCRIBE WHAT IT DOES. Dependecies: python3's chatterbot output/n7.txt: ocr/output.txt ## DESCRIBE WHAT IT DOES. Dependencies: python3's chatterbot
cat $< | python3 src/n_7.py > $(@) cat $< | python3 src/n_7.py > $(@)

@ -20,7 +20,7 @@ https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
- preceeding a command tells make to ignore errors in a recipe line - preceeding a command tells make to ignore errors in a recipe line
## DEPENDECIES AND RULES ## DEPENDENCIES AND RULES
a rule "asks" a *dependency* to be executed, only if the depency does not exist as a file a rule "asks" a *dependency* to be executed, only if the depency does not exist as a file
i.e. I have the 2 following rules in my make file: i.e. I have the 2 following rules in my make file:
@ -59,7 +59,7 @@ art: foo.txt
``` ```
For the first time you run `make art` the foo.txt dependency rule will be executed For the first time you run `make art` the foo.txt dependency rule will be executed
In subsequent runs of `make art` foo.txt dependency rule will NOT be executed, because its target: foo.txt is already in the make working directory In subsequent runs of `make art` foo.txt dependency rule will NOT be executed, because its target: foo.txt is already in the make working directory
To trigger the execution of foo.txt ruke, we need to remove its target from the working directoy To trigger the execution of foo.txt rule, we need to remove its target from the working directoy
That task if often delegate to a rule with target `clean` which removes the files/targets of make, such as That task if often delegate to a rule with target `clean` which removes the files/targets of make, such as
``` ```
@ -71,7 +71,7 @@ clean: removes output (target) files
After running `make clean` the foo.txt rule is executed (as a dependancy) when running `make art` After running `make clean` the foo.txt rule is executed (as a dependancy) when running `make art`
Tagets can also include subfolders: Targets can also include subfolders:
``` ```
output/art.txt: foo.txt output/art.txt: foo.txt
@ -84,4 +84,3 @@ Read more on https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html
# LINKS # LINKS
* About Makefile syntax: [5 Writing Recipes in Rules](https://www.gnu.org/software/make/manual/make.html#Recipes) * About Makefile syntax: [5 Writing Recipes in Rules](https://www.gnu.org/software/make/manual/make.html#Recipes)

Loading…
Cancel
Save