User:Angeliki/2nd Trimester

From XPUB & Lens-Based wiki

OCR

Tesseract training:

1. Install Tesseract
2. Recipe for training

Reading- Writing

Synopsis

Reader

Mini reader

Python scripts

"Python whisperer"

import nltk
import collections
import random
import sys

from sys import stdin, stderr, stdout

o = open("Synopsis_24012018.txt", 'r')
original = o.read()
tokens = nltk.word_tokenize(original)
for noun in tokens:
	noun = noun.lower()
# print (tokens)
v = open("nouns/91K nouns.txt")
nouns = v.read()
tokens_nouns = nltk.word_tokenize(nouns)
# print (tokens_nouns)
newnouns = []
for word in tokens:
	if word in tokens_nouns:
		n=tokens_nouns.index(word)
# 		# print (n)
		newnouns.append(tokens_nouns[n])
# 		# print (newnouns)

filename = 'Audiosfera-2015-Westerkamp.txt'
vocabulary = []

vocabulary_size = 1000
def read_input_text(filename):
    txtfile = open(filename, 'r') 
    string = txtfile.read()
    words = nltk.word_tokenize(string)
    # print (words)
    for word in words:
    	word=word.lower()
    	vocabulary.append(word)
    # print('Data size:', len(vocabulary))                

read_input_text(filename)
# print(vocabulary)

newsynopsis = []
for word in vocabulary:
	if word in tokens_nouns:
		newsynopsis.append(random.choice(newnouns))
	else:
		newsynopsis.append(word)
print (" ".join(newsynopsis))
Listen for voices while walking. Listen for pauses.Listen. What sounds in your home town indicate a specific time of day?

Here are such sounds from Vancouver. Listen. Sound example 4: Mix—Sound signals, time of day Listen for hums and motors for birdcalls and for pauses between the birdcalls. Listen for echoes. Sound example 5: Echo under parabolic bridge Bang on other objects that make interesting sounds—such as Henry Moore’s sculpture called Knife Edge in Queen Elizabeth Park in Vancouver. Sound example 6: Henry Moore’s sculpture Knife Edge Hear your breath and its rhythms your footsteps and their rhythm. Stop for a moment and listen to your thoughts. Let them pass like the sound of a car. Follow your thoughts until you cannot hear them any longer. Hear the pauses between sirens and horns and airplanes The sounds of different seasons. Sound example 7: Soundwalking—mix of excerpts, beaches and parks Sounds of clothes and of wind. Listen into the distance Stop listening for a moment.3 Radio that Listens Sound example 8: Soundwalking—mix of excerpts, shopping malls Listen as you return home Did you hear the sounds of this walk of this time in your life?

From a text of Hildegard Westerkamp


listen for information things system . listen for digital . listen . * what Plato in your copying throats indicate a then and of Joyce ? world painting such and from vancouver . listen . norms find 4 : mix—sound means , writing of understanding listen for structuralists medium practice for and rules for entropy between the looking . listen for processes . deals activities 5 : software under parabolic how forms on other and that writing interesting sounds—such as complex moore ’ s telephone called devise writing in and elizabeth inflection in vancouver . codex philosophers 6 : light moore ’ s and skulls can hear your says appropriation its and your real fundamental their nothing . part for a text perception listen to your foresight . chapter them content impossible the enigmas of a take . light your literates until position example not hear them any longer . hear the redundancy between control links referent writing accumulation the media of different story . using radical 7 : soundwalking—mix of find , materiality England rationality machine of social subjective of take . listen into the stirs creation art for a moment.3 and that listens authors call 8 : soundwalking—mix of how , contemporary writing listen as using performance minds did you hear the view of this how of this like in your objects ?

The output text with borrowed nouns from synopsis of several texts

"No_vocals poem"

l=list('aeiou')
original = input('give me the poem')

if len(original) > 0:
    word= original.lower()
    s=list(word)
    new_word=[]
    for i in s:
        if i!=l[0] and i!=l[1] and i!=l[2] and i!=l[3] and i!=l[4]:
           new_word.append(i)
    print (''.join(new_word))
else:
    print ('empty')
Jack tells Jill Jill tells Jack Jack wants Jill Jill wants Jack a perfect contract Jill wants Jack to want Jill to want Jacks want ofher want for his want of her want of Jacks want that Jill wants Jack to want Jill to want Jacks want of her want for his want of her to want Jack to want

From "Knots", R.D.Laing

jck tlls jll jll tlls jck jck wnts jll jll wnts jck prfct cntrct jll wnts jck t wnt jll t wnt jcks wnt fhr wnt fr hs wnt f hr wnt f jcks wnt tht jll wnts jck t wnt jll t wnt jcks wnt f hr wnt fr hs wnt f hr t wnt jck t wnt