1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
# OuNuPo Make Software experiments for the OuNuPo bookscanner, part of Special Issue 5 <https://issue.xpub.nl/05/> <https://git.xpub.nl/OuNuPo-make/> <https://xpub.nl/> ## Authors Natasha Berting, Angeliki Diakrousi, Joca van der Horst, Alexander Roidl, Alice Strete and Zalán Szakács. ## Clone Repository `git clone https://git.xpub.nl/repos/OuNuPo-make.git` ## General depencies * Python3 * GNU make * Python3 NLTK `pip3 install nltk` # Make commands ## Sitting inside a pocket(sphinx): Angeliki Speech recognition feedback loops using the first sentence of a scanned text as input run: `make ttssr-human-only` Specific Dependencies: * PocketSphinx package `sudo aptitude install pocketsphinx pocketsphinx-en-us` * PocketSphinx Python library: `sudo pip3 install PocketSphinx` * Other software packages:`sudo apt-get install gcc automake autoconf libtool bison swig python-dev libpulse-dev` * Speech Recognition Python library: `sudo pip3 install SpeechRecognition` * TermColor Python library: `sudo pip3 install termcolor` * PyAudio Python library: `sudo pip3 install pyaudio` ### Licenses: © 2018 WTFPL – Do What the Fuck You Want to Public License. © 2018 BSD 3-Clause – Berkeley Software Distribution ## Reading the Structure: Joca Uses OCR'ed text as an input, labels each word for Part-of-Speech, stopwords and sentiment. Then it generates a reading interface where words with a specific label are hidden. Output can be saved as poster, or exported as json featuring the full data set. Run: `make reading_structure` Specific Dependencies: * [NLTK](http://www.nltk.org/install.html) packages: tokenize.punkt, pos_tag, word_tokenize, sentiment.vader, vader_lexicon (python3; import nltk; nltk.download() and select these models) * [spaCy](https://spacy.io/usage/) Python library * spacy: en_core_web_sm model (python3 -m spacy download en_core_web_sm) * [weasyprint](http://weasyprint.readthedocs.io/en/latest/install.html) * [jinja2](http://jinja.pocoo.org/docs/2.10/intro/#installation) * font: [PT Sans]( https://www.fontsquirrel.com/fonts/pt-serif) * font: [Ubuntu Mono](https://www.fontsquirrel.com/fonts/ubuntu-mono) ### License: GNU AGPLv3 Permissions of this license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available. See src/reading_structure/license.txt for the full license. ## Erase / Replace: Natasha Description: Receives your scanned pages in order, then analyzes each image and its vocabulary. Finds and crops the least common words, and either erases them, or replaces them with the most common words. Outputs a PDF of increasingly distorted scan images. For erase script run: `make erase` For replace script run: `make replace` Specific Dependencies: * NLTK English Corpus: * run NLTK downloader `python -m nltk.downloader` * select menu "Corpora" * select "stopwords" * "Download" * Python Image Library (PIL): `pip3 install Pillow` * PDF generation for Python (FPDF): `pip3 install fpdf` * HTML5lib Python Library: `pip3 install html5lib` ### Notes & Bugs: This script is very picky about the input images it can work with. For best results, please use high resolution images in RGB colorspace. Errors can occur when image modes do not match or tesseract cannot successfully make HOCR files. ## carlandre & over/under: Alice Strete Person who aspires to call herself a software artist sometime next year. ### License: Copyright © 2018 Alice Strete This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. ### Dependencies: * [pytest](https://docs.pytest.org/en/latest/getting-started.html) Programs: ### carlandre Description: Generates concrete poetry from a text file. If you're connected to a printer located in /dev/usb/lp0 you can print the poem. run: `make carlandre` ### over/under Description: Interpreted programming language written in Python3 which translates basic weaving instructions into code and applies them to text. run: `make overunder` ### Instructions: * over/under works with specific commands which execute specific instructions. * When running, an interpreter will open: `> ` * To load your text, type 'load'. This is necessary before any other instructions. Every time you load the text, the previous instructions will be discarded. * To see the line you are currently on, type 'show'. * To start your pattern, type 'over' or 'under', each followed by an integer, separated by a comma. e.g. over 5, under 5, over 6, under 10 * To move on to the next line of text, press enter twice. * To see your pattern, type 'pattern'. * To save your pattern in a text file, type 'save'. * To leave the program, type 'quit'. ## oulibot: Alex Description: Chatbot that will help you to write a poem based on the text you inserted by giving you constraints. run: `make oulibot` #### Dependencies: Python libraries * irc : `pip3 install irc` * rake_nltk Python library: `pip3 install rake_nltk` * textblob: `pip3 install textblob` * PIL: `pip3 install Pillow` * numpy: `pip3 install numpy` * tweepy: `pip3 install tweepy` * NLTK stopwords: * run NLTK downloader `python -m nltk.downloader` * select menu "Corpora" * select "stopwords" * "Download"