User:Silviolorusso/prototyping/chitchatwithpetraandmarie: Difference between revisions
No edit summary |
No edit summary |
||
(20 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
Text-based reworking, databases and stuff | Text-based reworking, databases and stuff | ||
== Inspirations == | |||
* | * google alphabet http://vimeo.com/26191221 | ||
* | * suggestions http://www.silviolorusso.com/suggestions/suggestions_verbs.php | ||
* | * ideal city by petra | ||
* http://www.a-blast.org/ | |||
* the form and the frame http://www.onomatopee.net/pages/projecten/omp41.html | |||
== Questions and ideas == | |||
* | * In a text each word connected to its definition. | ||
* What is behind a word? | |||
* Recursive process into the same text. | |||
* What a word can link to? | |||
* Using urls www.one.com www.day.com www.i.com www.was.com | |||
* | |||
== Disappearance, repetition and consumption == | |||
I wrote a bit of code that does what we were discussing in class: each word in a text become more transparent each time is repeated. I was thinking at the world of information and news. I was thinking that the meaning of the words is consumed by their repetition. Think of #OccupyWallStreet, think of what will happen with SOPA. | |||
Here's the script if you wanna play with it. | |||
<source lang="python"> | |||
#!/usr/bin/python | |||
import re | |||
text = "The text that has to be processed." | |||
words = text.split() | |||
wordsOp = "" | |||
checklist = {} | |||
for words in words: | |||
# split the word from punctuation | |||
word = re.findall(r'\w+',words) | |||
# make the word lowercase | |||
wordLow = word[0].lower() | |||
# check if the word is in the dictionary, if the word is there count +1, if not there add the word to the checklist and count 255(maximum opacity) | |||
if wordLow in checklist: | |||
checklist[wordLow] += 1 | |||
else: | |||
checklist[wordLow] = 0 | |||
# append words with opacity (HTML) | |||
wordsOp = wordsOp + "<span style=\"color:rgb(" + str(checklist[wordLow]) + "," + str(checklist[wordLow]) + "," + str(checklist[wordLow]) + ");\">" + words + "</span> " | |||
# print the new string | |||
print wordsOp | |||
</source> | |||
And here's a little demo of how it works | |||
<span style="color:rgb(0,0,0);">This</span> <span style="color:rgb(0,0,0);">text</span> <span style="color:rgb(0,0,0);">is</span> <span style="color:rgb(0,0,0);">going</span> <span style="color:rgb(0,0,0);">to</span> <span style="color:rgb(0,0,0);">disappear.</span> <span style="color:rgb(1,1,1);">disappear.</span> <span style="color:rgb(2,2,2);">disappear.</span> <span style="color:rgb(3,3,3);">disappear.</span> <span style="color:rgb(4,4,4);">disappear.</span> <span style="color:rgb(5,5,5);">disappear.</span> <span style="color:rgb(6,6,6);">disappear.</span> <span style="color:rgb(7,7,7);">disappear.</span> <span style="color:rgb(8,8,8);">disappear.</span> <span style="color:rgb(9,9,9);">disappear.</span> <span style="color:rgb(10,10,10);">disappear.</span> <span style="color:rgb(11,11,11);">disappear.</span> <span style="color:rgb(12,12,12);">disappear.</span> <span style="color:rgb(13,13,13);">disappear.</span> <span style="color:rgb(14,14,14);">disappear.</span> <span style="color:rgb(15,15,15);">disappear.</span> <span style="color:rgb(16,16,16);">disappear.</span> <span style="color:rgb(17,17,17);">disappear.</span> <span style="color:rgb(18,18,18);">disappear.</span> <span style="color:rgb(19,19,19);">disappear.</span> <span style="color:rgb(20,20,20);">disappear.</span> <span style="color:rgb(21,21,21);">disappear.</span> <span style="color:rgb(22,22,22);">disappear.</span> <span style="color:rgb(23,23,23);">disappear.</span> <span style="color:rgb(24,24,24);">disappear.</span> <span style="color:rgb(25,25,25);">disappear.</span> <span style="color:rgb(26,26,26);">disappear.</span> <span style="color:rgb(27,27,27);">disappear.</span> <span style="color:rgb(28,28,28);">disappear.</span> <span style="color:rgb(29,29,29);">disappear.</span> <span style="color:rgb(30,30,30);">disappear.</span> <span style="color:rgb(31,31,31);">disappear.</span> <span style="color:rgb(32,32,32);">disappear.</span> <span style="color:rgb(33,33,33);">disappear.</span> <span style="color:rgb(34,34,34);">disappear.</span> <span style="color:rgb(35,35,35);">disappear.</span> <span style="color:rgb(36,36,36);">disappear.</span> <span style="color:rgb(37,37,37);">disappear.</span> <span style="color:rgb(38,38,38);">disappear.</span> <span style="color:rgb(39,39,39);">disappear.</span> <span style="color:rgb(40,40,40);">disappear.</span> <span style="color:rgb(41,41,41);">disappear.</span> <span style="color:rgb(42,42,42);">disappear.</span> <span style="color:rgb(43,43,43);">disappear.</span> <span style="color:rgb(44,44,44);">disappear.</span> <span style="color:rgb(45,45,45);">disappear.</span> <span style="color:rgb(46,46,46);">disappear.</span> <span style="color:rgb(47,47,47);">disappear.</span> <span style="color:rgb(48,48,48);">disappear.</span> <span style="color:rgb(49,49,49);">disappear.</span> <span style="color:rgb(50,50,50);">disappear.</span> <span style="color:rgb(51,51,51);">disappear.</span> <span style="color:rgb(52,52,52);">disappear.</span> <span style="color:rgb(53,53,53);">disappear.</span> <span style="color:rgb(54,54,54);">disappear.</span> <span style="color:rgb(55,55,55);">disappear.</span> <span style="color:rgb(56,56,56);">disappear.</span> <span style="color:rgb(57,57,57);">disappear.</span> <span style="color:rgb(58,58,58);">disappear.</span> <span style="color:rgb(59,59,59);">disappear.</span> <span style="color:rgb(60,60,60);">disappear.</span> <span style="color:rgb(61,61,61);">disappear.</span> <span style="color:rgb(62,62,62);">disappear.</span> <span style="color:rgb(63,63,63);">disappear.</span> <span style="color:rgb(64,64,64);">disappear.</span> <span style="color:rgb(65,65,65);">disappear.</span> <span style="color:rgb(66,66,66);">disappear.</span> <span style="color:rgb(67,67,67);">disappear.</span> <span style="color:rgb(68,68,68);">disappear.</span> <span style="color:rgb(69,69,69);">disappear.</span> <span style="color:rgb(70,70,70);">disappear.</span> <span style="color:rgb(71,71,71);">disappear.</span> <span style="color:rgb(72,72,72);">disappear.</span> <span style="color:rgb(73,73,73);">disappear.</span> <span style="color:rgb(74,74,74);">disappear.</span> <span style="color:rgb(75,75,75);">disappear.</span> <span style="color:rgb(76,76,76);">disappear.</span> <span style="color:rgb(77,77,77);">disappear.</span> <span style="color:rgb(78,78,78);">disappear.</span> <span style="color:rgb(79,79,79);">disappear.</span> <span style="color:rgb(80,80,80);">disappear.</span> <span style="color:rgb(81,81,81);">disappear.</span> <span style="color:rgb(82,82,82);">disappear.</span> <span style="color:rgb(83,83,83);">disappear.</span> <span style="color:rgb(84,84,84);">disappear.</span> <span style="color:rgb(85,85,85);">disappear.</span> <span style="color:rgb(86,86,86);">disappear.</span> <span style="color:rgb(87,87,87);">disappear.</span> <span style="color:rgb(88,88,88);">disappear.</span> <span style="color:rgb(89,89,89);">disappear.</span> <span style="color:rgb(90,90,90);">disappear.</span> <span style="color:rgb(91,91,91);">disappear.</span> <span style="color:rgb(92,92,92);">disappear.</span> <span style="color:rgb(93,93,93);">disappear.</span> <span style="color:rgb(94,94,94);">disappear.</span> <span style="color:rgb(95,95,95);">disappear.</span> <span style="color:rgb(96,96,96);">disappear.</span> <span style="color:rgb(97,97,97);">disappear.</span> <span style="color:rgb(98,98,98);">disappear.</span> <span style="color:rgb(99,99,99);">disappear.</span> <span style="color:rgb(100,100,100);">disappear.</span> <span style="color:rgb(101,101,101);">disappear.</span> <span style="color:rgb(102,102,102);">disappear.</span> <span style="color:rgb(103,103,103);">disappear.</span> <span style="color:rgb(104,104,104);">disappear.</span> <span style="color:rgb(105,105,105);">disappear.</span> <span style="color:rgb(106,106,106);">disappear.</span> <span style="color:rgb(107,107,107);">disappear.</span> <span style="color:rgb(108,108,108);">disappear.</span> <span style="color:rgb(109,109,109);">disappear.</span> <span style="color:rgb(110,110,110);">disappear.</span> <span style="color:rgb(111,111,111);">disappear.</span> <span style="color:rgb(112,112,112);">disappear.</span> <span style="color:rgb(113,113,113);">disappear.</span> <span style="color:rgb(114,114,114);">disappear.</span> <span style="color:rgb(115,115,115);">disappear.</span> <span style="color:rgb(116,116,116);">disappear.</span> <span style="color:rgb(117,117,117);">disappear.</span> <span style="color:rgb(118,118,118);">disappear.</span> <span style="color:rgb(119,119,119);">disappear.</span> <span style="color:rgb(120,120,120);">disappear.</span> <span style="color:rgb(121,121,121);">disappear.</span> <span style="color:rgb(122,122,122);">disappear.</span> <span style="color:rgb(123,123,123);">disappear.</span> <span style="color:rgb(124,124,124);">disappear.</span> <span style="color:rgb(125,125,125);">disappear.</span> <span style="color:rgb(126,126,126);">disappear.</span> <span style="color:rgb(127,127,127);">disappear.</span> <span style="color:rgb(128,128,128);">disappear.</span> <span style="color:rgb(129,129,129);">disappear.</span> <span style="color:rgb(130,130,130);">disappear.</span> <span style="color:rgb(131,131,131);">disappear.</span> <span style="color:rgb(132,132,132);">disappear.</span> <span style="color:rgb(133,133,133);">disappear.</span> <span style="color:rgb(134,134,134);">disappear.</span> <span style="color:rgb(135,135,135);">disappear.</span> <span style="color:rgb(136,136,136);">disappear.</span> <span style="color:rgb(137,137,137);">disappear.</span> <span style="color:rgb(138,138,138);">disappear.</span> <span style="color:rgb(139,139,139);">disappear.</span> <span style="color:rgb(140,140,140);">disappear.</span> <span style="color:rgb(141,141,141);">disappear.</span> <span style="color:rgb(142,142,142);">disappear.</span> <span style="color:rgb(143,143,143);">disappear.</span> <span style="color:rgb(144,144,144);">disappear.</span> <span style="color:rgb(145,145,145);">disappear.</span> <span style="color:rgb(146,146,146);">disappear.</span> <span style="color:rgb(147,147,147);">disappear.</span> <span style="color:rgb(148,148,148);">disappear.</span> <span style="color:rgb(149,149,149);">disappear.</span> <span style="color:rgb(150,150,150);">disappear.</span> <span style="color:rgb(151,151,151);">disappear.</span> <span style="color:rgb(152,152,152);">disappear.</span> <span style="color:rgb(153,153,153);">disappear.</span> <span style="color:rgb(154,154,154);">disappear.</span> <span style="color:rgb(155,155,155);">disappear.</span> <span style="color:rgb(156,156,156);">disappear.</span> <span style="color:rgb(157,157,157);">disappear.</span> <span style="color:rgb(158,158,158);">disappear.</span> <span style="color:rgb(159,159,159);">disappear.</span> <span style="color:rgb(160,160,160);">disappear.</span> <span style="color:rgb(161,161,161);">disappear.</span> <span style="color:rgb(162,162,162);">disappear.</span> <span style="color:rgb(163,163,163);">disappear.</span> <span style="color:rgb(164,164,164);">disappear.</span> <span style="color:rgb(165,165,165);">disappear.</span> <span style="color:rgb(166,166,166);">disappear.</span> <span style="color:rgb(167,167,167);">disappear.</span> <span style="color:rgb(168,168,168);">disappear.</span> <span style="color:rgb(169,169,169);">disappear.</span> <span style="color:rgb(170,170,170);">disappear.</span> <span style="color:rgb(171,171,171);">disappear.</span> <span style="color:rgb(172,172,172);">disappear.</span> <span style="color:rgb(173,173,173);">disappear.</span> <span style="color:rgb(174,174,174);">disappear.</span> <span style="color:rgb(175,175,175);">disappear.</span> <span style="color:rgb(176,176,176);">disappear.</span> <span style="color:rgb(177,177,177);">disappear.</span> <span style="color:rgb(178,178,178);">disappear.</span> <span style="color:rgb(179,179,179);">disappear.</span> <span style="color:rgb(180,180,180);">disappear.</span> <span style="color:rgb(181,181,181);">disappear.</span> <span style="color:rgb(182,182,182);">disappear.</span> <span style="color:rgb(183,183,183);">disappear.</span> <span style="color:rgb(184,184,184);">disappear.</span> <span style="color:rgb(185,185,185);">disappear.</span> <span style="color:rgb(186,186,186);">disappear.</span> <span style="color:rgb(187,187,187);">disappear.</span> <span style="color:rgb(188,188,188);">disappear.</span> <span style="color:rgb(189,189,189);">disappear.</span> <span style="color:rgb(190,190,190);">disappear.</span> <span style="color:rgb(191,191,191);">disappear.</span> <span style="color:rgb(192,192,192);">disappear.</span> <span style="color:rgb(193,193,193);">disappear.</span> <span style="color:rgb(194,194,194);">disappear.</span> <span style="color:rgb(195,195,195);">disappear.</span> <span style="color:rgb(196,196,196);">disappear.</span> <span style="color:rgb(197,197,197);">disappear.</span> <span style="color:rgb(198,198,198);">disappear.</span> <span style="color:rgb(199,199,199);">disappear.</span> <span style="color:rgb(200,200,200);">disappear.</span> <span style="color:rgb(201,201,201);">disappear.</span> <span style="color:rgb(202,202,202);">disappear.</span> <span style="color:rgb(203,203,203);">disappear.</span> <span style="color:rgb(204,204,204);">disappear.</span> <span style="color:rgb(205,205,205);">disappear.</span> <span style="color:rgb(206,206,206);">disappear.</span> <span style="color:rgb(207,207,207);">disappear.</span> <span style="color:rgb(208,208,208);">disappear.</span> <span style="color:rgb(209,209,209);">disappear.</span> <span style="color:rgb(210,210,210);">disappear.</span> <span style="color:rgb(211,211,211);">disappear.</span> <span style="color:rgb(212,212,212);">disappear.</span> <span style="color:rgb(213,213,213);">disappear.</span> <span style="color:rgb(214,214,214);">disappear.</span> <span style="color:rgb(215,215,215);">disappear.</span> <span style="color:rgb(216,216,216);">disappear.</span> <span style="color:rgb(217,217,217);">disappear.</span> <span style="color:rgb(218,218,218);">disappear.</span> <span style="color:rgb(219,219,219);">disappear.</span> <span style="color:rgb(220,220,220);">disappear.</span> <span style="color:rgb(221,221,221);">disappear.</span> <span style="color:rgb(222,222,222);">disappear.</span> <span style="color:rgb(223,223,223);">disappear.</span> <span style="color:rgb(224,224,224);">disappear.</span> <span style="color:rgb(225,225,225);">disappear.</span> <span style="color:rgb(226,226,226);">disappear.</span> <span style="color:rgb(227,227,227);">disappear.</span> <span style="color:rgb(228,228,228);">disappear.</span> <span style="color:rgb(229,229,229);">disappear.</span> <span style="color:rgb(230,230,230);">disappear.</span> <span style="color:rgb(231,231,231);">disappear.</span> <span style="color:rgb(232,232,232);">disappear.</span> <span style="color:rgb(233,233,233);">disappear.</span> <span style="color:rgb(234,234,234);">disappear.</span> <span style="color:rgb(235,235,235);">disappear.</span> <span style="color:rgb(236,236,236);">disappear.</span> <span style="color:rgb(237,237,237);">disappear.</span> <span style="color:rgb(238,238,238);">disappear.</span> <span style="color:rgb(239,239,239);">disappear.</span> <span style="color:rgb(240,240,240);">disappear.</span> <span style="color:rgb(241,241,241);">disappear.</span> <span style="color:rgb(242,242,242);">disappear.</span> <span style="color:rgb(243,243,243);">disappear.</span> <span style="color:rgb(244,244,244);">disappear.</span> <span style="color:rgb(245,245,245);">disappear.</span> <span style="color:rgb(246,246,246);">disappear.</span> <span style="color:rgb(247,247,247);">disappear.</span> <span style="color:rgb(248,248,248);">disappear.</span> <span style="color:rgb(249,249,249);">disappear.</span> <span style="color:rgb(250,250,250);">disappear.</span> <span style="color:rgb(251,251,251);">disappear.</span> <span style="color:rgb(252,252,252);">disappear.</span> <span style="color:rgb(253,253,253);">disappear.</span> <span style="color:rgb(254,254,254);">disappear.</span> <span style="color:rgb(255,255,255);">disappear.</span> <span style="color:rgb(256,256,256);">disappear.</span> <span style="color:rgb(257,257,257);">disappear.</span> | |||
== Possible texts to apply the script == | |||
* Lyotard, les immaterieux | |||
* Derrida, Archive Fever | |||
<source lang="python"> | |||
import sys, json, urllib2, os | |||
from pprint import pprint | |||
#urllib2.urlopen("http://en.wikipedia.org/w/api.php?format=json&action=query&titles=Nick%20Carter&prop=revisions&rvprop=content") | |||
f = urllib2.urlopen("http://en.wikipedia.org/w/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:American_child_singers&cmdir=desc&cmlimit=500") | |||
data = json.load(f) | |||
#Category:American_child_singers | |||
#api.php?action=query&list=allcategories&acprefix=List%20of | |||
#print data | |||
print json.dumps(data, sort_keys=True, indent=4) | |||
for r in data['query']['categorymembers']: | |||
print r["pageid"] | |||
f2 = urllib2.urlopen( "http://en.wikipedia.org/w/api.php?format=json&action=query&pageids="+str(r["pageid"])+"&prop=revisions&rvprop=content" ) | |||
data2 = json.load(f2) | |||
maintext = data2['query']['pages'][str(r["pageid"])]["revisions"][0]["*"] | |||
if maintext.rfind('song') != -1: | |||
print maintext | |||
#print data['query']['pages']['83106'] | |||
#print json.dumps(data['query']['pages'], sort_keys=True, indent=4) | |||
#for r in data['query']['pages']: | |||
# print json.dumps(r["revisions"][0]["*"], sort_keys=True, indent=4) | |||
</source> |
Latest revision as of 15:07, 9 February 2012
Chitchat with Marie, Petra and Silvio | 19/01/12
Text-based reworking, databases and stuff
Inspirations
- google alphabet http://vimeo.com/26191221
- suggestions http://www.silviolorusso.com/suggestions/suggestions_verbs.php
- ideal city by petra
- http://www.a-blast.org/
- the form and the frame http://www.onomatopee.net/pages/projecten/omp41.html
Questions and ideas
- In a text each word connected to its definition.
- What is behind a word?
- Recursive process into the same text.
- What a word can link to?
- Using urls www.one.com www.day.com www.i.com www.was.com
Disappearance, repetition and consumption
I wrote a bit of code that does what we were discussing in class: each word in a text become more transparent each time is repeated. I was thinking at the world of information and news. I was thinking that the meaning of the words is consumed by their repetition. Think of #OccupyWallStreet, think of what will happen with SOPA.
Here's the script if you wanna play with it.
#!/usr/bin/python
import re
text = "The text that has to be processed."
words = text.split()
wordsOp = ""
checklist = {}
for words in words:
# split the word from punctuation
word = re.findall(r'\w+',words)
# make the word lowercase
wordLow = word[0].lower()
# check if the word is in the dictionary, if the word is there count +1, if not there add the word to the checklist and count 255(maximum opacity)
if wordLow in checklist:
checklist[wordLow] += 1
else:
checklist[wordLow] = 0
# append words with opacity (HTML)
wordsOp = wordsOp + "<span style=\"color:rgb(" + str(checklist[wordLow]) + "," + str(checklist[wordLow]) + "," + str(checklist[wordLow]) + ");\">" + words + "</span> "
# print the new string
print wordsOp
And here's a little demo of how it works
This text is going to disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear. disappear.
Possible texts to apply the script
- Lyotard, les immaterieux
- Derrida, Archive Fever
import sys, json, urllib2, os
from pprint import pprint
#urllib2.urlopen("http://en.wikipedia.org/w/api.php?format=json&action=query&titles=Nick%20Carter&prop=revisions&rvprop=content")
f = urllib2.urlopen("http://en.wikipedia.org/w/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:American_child_singers&cmdir=desc&cmlimit=500")
data = json.load(f)
#Category:American_child_singers
#api.php?action=query&list=allcategories&acprefix=List%20of
#print data
print json.dumps(data, sort_keys=True, indent=4)
for r in data['query']['categorymembers']:
print r["pageid"]
f2 = urllib2.urlopen( "http://en.wikipedia.org/w/api.php?format=json&action=query&pageids="+str(r["pageid"])+"&prop=revisions&rvprop=content" )
data2 = json.load(f2)
maintext = data2['query']['pages'][str(r["pageid"])]["revisions"][0]["*"]
if maintext.rfind('song') != -1:
print maintext
#print data['query']['pages']['83106']
#print json.dumps(data['query']['pages'], sort_keys=True, indent=4)
#for r in data['query']['pages']:
# print json.dumps(r["revisions"][0]["*"], sort_keys=True, indent=4)