User:Angeliki/Side projects: Difference between revisions
Line 216: | Line 216: | ||
==== Manifesto reading ==== | ==== Manifesto reading ==== | ||
{{#Widget:Audio|mp3=https://pzwiki.wdka.nl/mw-mediadesign/images/e/e7/Tab-manifesto.mp3}} | |||
[[File:IMG 0780.JPG|700px]] | |||
=== TAB- Zine === | === TAB- Zine === |
Revision as of 16:27, 18 June 2018
T.A.B- Temporary Autonomous Bureau
...items up to it and has sometimes that happens on purpose but to honk sometimes it just goes by accident found 'em by using the archive resume resource for the programs i think we don't just shook is the most artifacts which often happens in in in the library bobbitt's make backbiting by doing that this movie also reflect on the paws and we try to use our imagination for and hopefully together we can shape the new ideas for the future about arm off an institution like warm and what we doing that and so that's assured to introduction of about what to buy it is why be doing its path and i hope it makes sense iron and then the next question you guys ask me is about what is the relation of fire they obit graham and whether some basic steps that you've been taking in your negotiations with worm law a visit to the started from scratch found out i was an intern at that time and i was so high as two says the previews director and there on my internship lawsuits are nine months' the during that period to five always been interested in all of the mess that was lying around there and that the moon to the director a moment i think really enjoyed that masson was also creating it sometimes if i have known that that i think even go to high on a farm it was a he used it to make jack that are programs that it was for him away to get very productive but found i've been completely agree with it i liked it better clown at the same time ohio responded to shame that so many things were just getting dustin that are out the good damaged and eight as simply got thrown away and so every time i get the chance to say something aghazadeh garbage and i'm there was basically no archive at that point so calm out just out of my own and to soda pop and just i started to make about the base then as soon after i had been that an intent to assist me should that and i was really interested in the idea of setting up my own life he had in there because it was a lot of media which interested me and then may...
April: Events
Slogan generator
#get text and split into tokens and parts of speech
import nltk
from nltk import pos_tag, word_tokenize, WhitespaceTokenizer
import sys
from sys import stdin
import random
from nltk.corpus import wordnet
from termcolor import cprint, colored
color = ["white", "yellow"]
on_color = ["on_red", "on_magenta", "on_blue", "on_grey"]
def tags(tag):
if tag in {"NNP","NNS","NN","NNPS"}:
POS_tag = 'noun'
elif tag in {'VB','VBD','VBG','VBN','VBP','VBZ'}:
POS_tag = 'verb'
elif tag in {'RB','RBR','RBS','WRB', 'RP'}:
POS_tag = 'adverb'
elif tag in {'PRP','PRP$'}:
POS_tag = 'pronoun'
elif tag in {'JJ','JJR','JJS'}:
POS_tag = 'adjective'
elif tag == 'IN':
POS_tag = 'preposition'
elif tag == 'WDT':
POS_tag = 'determiner'
elif tag in {'WP','WP$'}:
POS_tag = 'pronoun'
elif tag == 'UH':
POS_tag = 'interjection'
elif tag == 'POS':
POS_tag = 'possesive ending'
elif tag == 'SYM':
POS_tag = 'symbol'
elif tag == 'EX':
POS_tag = 'existential there'
elif tag == 'DT':
POS_tag = 'determiner'
elif tag == 'MD':
POS_tag = 'modal'
elif tag == 'LS':
POS_tag = 'list item marker'
elif tag == 'FW':
POS_tag = 'foreign word'
elif tag == 'CC':
POS_tag = 'coordinating conjunction '
elif tag == 'CD':
POS_tag = 'cardinal number'
elif tag == 'TO':
POS_tag = 'to'
elif tag == '.':
POS_tag = 'line ending'
elif tag == ',':
POS_tag = 'comma'
else:
POS_tag = tag
return POS_tag
def POS_tagger(words):
taggedwordlist = nltk.pos_tag(words)
taglist = [pos for word,pos in taggedwordlist]
POS_tags = []
for item in taggedwordlist:
postag = tags(item[1])
POS_tags.append([item[0], postag])
return POS_tags
def givemeone(postag, allthewords):
filtered = []
for wordgroup in allthewords:
if wordgroup[1] == postag:
filtered.append(wordgroup[0])
return random.choice(filtered)
def alltags(allthewords):
return [t[1] for t in allthewords]
def doslogan1():
transcript = open('transcription.txt').read()
words = WhitespaceTokenizer().tokenize(transcript)
tagged = POS_tagger(words)
tags = alltags(tagged)
newlist = []
structure1 = ['verb', 'noun', 'determiner', 'verb', 'determiner', random.choice(syns)]
for index, item in enumerate(structure1):
if item in tags:
one = givemeone(item, tagged)
newlist.append(one)
else:
newlist.append(item)
cprint(' '.join(newlist), random.choice(color), random.choice(on_color))
def doslogan2():
transcript = open('transcription.txt').read()
words = WhitespaceTokenizer().tokenize(transcript)
tagged = POS_tagger(words)
tags = alltags(tagged)
newlist = []
structure1 = ['verb', 'preposition', 'determiner', random.choice(syns)]
for index, item in enumerate(structure1):
if item in tags:
one = givemeone(item, tagged)
newlist.append(one)
else:
newlist.append(item)
cprint(' '.join(newlist), random.choice(color), random.choice(on_color))
def doslogan3():
transcript = open('transcription.txt').read()
words = WhitespaceTokenizer().tokenize(transcript)
tagged = POS_tagger(words)
tags = alltags(tagged)
newlist = []
structure1 = ['adjective', 'determiner', random.choice(syns)]
for index, item in enumerate(structure1):
if item in tags:
one = givemeone(item, tagged)
newlist.append(one)
else:
newlist.append(item)
cprint(' '.join(newlist), random.choice(color), random.choice(on_color))
def doslogan4():
transcript = open('transcription.txt').read()
words = WhitespaceTokenizer().tokenize(transcript)
tagged = POS_tagger(words)
tags = alltags(tagged)
newlist = []
structure1 = [random.choice(syns), 'determiner', 'noun']
for index, item in enumerate(structure1):
if item in tags:
one = givemeone(item, tagged)
newlist.append(one)
else:
newlist.append(item)
print(' '.join(newlist))
def doslogan5():
transcript = open('transcription.txt').read()
words = WhitespaceTokenizer().tokenize(transcript)
tagged = POS_tagger(words)
tags = alltags(tagged)
newlist = []
structure1 = [random.choice(syns), 'preposition', 'noun']
for index, item in enumerate(structure1):
if item in tags:
one = givemeone(item, tagged)
newlist.append(one)
else:
newlist.append(item)
cprint(' '.join(newlist), random.choice(color), random.choice(on_color))
answer= input('Would you like to generate random slogans from the dataset? (y/n) ')
if answer == 'y' or answer == 'Y':
syns = []
syns.append('noun')
print ('\nVery well, here is what I have for now:\n')
for _ in range(0,5):
doslogan1()
doslogan2()
doslogan3()
doslogan4()
doslogan5()
elif answer == 'n' or answer == 'N':
topic = input('What topic would you like your slogan to have?\n ')
syns = []
for syn in wordnet.synsets(topic):
for lemma in syn.lemmas():
syns.append(lemma.name())
print ('Ok then, here are your slogans:\n')
for _ in range(0,5):
doslogan1()
doslogan2()
doslogan3()
doslogan4()
doslogan5()
print ('\nCopy your best slogans in a textfile with "CTRL+SHIFT+C"\n')
print ('\n\nDo you want to try one more time? \nThen, run "python3 generator.py" in the terminal (this black screen that you see) one more time.\n')
Manifesto reading
TAB- Zine
ttbr- teeth to be recovered
Weather Satellites, antennas and audio data
FOSSDEM
RTL-SDR