User:Clara/S13

From XPUB & Lens-Based wiki

Prototype

Random definition generator


Experimenting with patches


Experimenting with NLTK


Try out response to '?!'

I the proceeded to mix and use what I learned from the classes to create my response to the text

One of many drafts were I used replace to change to punctuation in the text (this was for the print version)

txt = open('txt/!?_test.txt', 'r').read()

#!
txt = txt.replace('! ','<span style="color: grey;">[circle the right punctuation ?/!]</span>')
txt = txt.replace("!’",'<span style="color: grey;">[circle the right punctuation ?/!]</span>')
txt = txt.replace('!\n','<span style="color: grey;">[circle the right punctuation ?/!]</span>\n')
txt = txt.replace('!”','<span style="color: grey;">[circle the right punctuation ?/!]</span>')

#?
txt = txt.replace("? ",'<span style="color: grey;">[circle the right punctuation ?/!]</span>')
txt = txt.replace("?’",'<span style="color: grey;">[circle the right punctuation ?/!]</span>')
txt = txt.replace('?\n','<span style="color: grey;">[circle the right punctuation ?/!]</span>\n')
txt = txt.replace('?”','<span style="color: grey;">[circle the right punctuation ?/!]</span>')

#,
txt = txt.replace(", ",'<span style="color: grey;">[circle the right punctuation ,/.]</span>')

#.
txt = txt.replace(". ",'<span style="color: grey;">[circle the right punctuation ,/.]</span>')
txt = txt.replace(".’",'<span style="color: grey;">[circle the right punctuation ,/.]</span>')
txt = txt.replace(".”",'<span style="color: grey;">[circle the right punctuation ,/.]</span>')

#…
txt = txt.replace('… ','<span style="color: grey;">[circle the right punctuation ;/…]</span>')

#line break
txt = txt.replace("\n",'<br>')

print(txt)

here is a part of the output

[circle the right punctuation ?/!]/ [circle the right punctuation ?/!]

Nina Power

Part 1: [circle the right punctuation ?/!]

“[T]he entire thrust of the LTI The Langue of the Third Reich was towards visualisation[circle the right punctuation ,/.]and if this process of visualizing could be achieved with recourse to Germanic traditions[circle the right punctuation ,/.]by means of a runic sign[circle the right punctuation ,/.]then so much the better[circle the right punctuation ,/.]And as a jagged character the rune of life was related to the SS symbol[circle the right punctuation ,/.]and as an ideological symbol also related to the spokes of the wheel of the sun[circle the right punctuation ,/.]the swastika [circle the right punctuation ;/…]Renan’s position: the question mark – the most important of all punctuation marks[circle the right punctuation ,/.]A position in direct opposition to National Socialist intransigence and self-confidence [circle the right punctuation ;/…]

here is another replace I used, it's very straight forward and basically randomly picks a replacement for punctuation within the text.

txt = open('txt/!?_test.txt', 'r').read()

point = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")
point2 = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")
point3 = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")
point4 = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")
point5 = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")
point6 = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")
point7 = ("!","?","!!","??","!?","?!","!!!","?!?","???","!?!")


import random
import re
def replace(m):
    t=m.group(0)
    if t=="!":
        return random.choice(point)
    elif t=="?":
        return random.choice(point2)
    elif t=="??":
        return random.choice(point3)
    elif t=="?!":
        return random.choice(point4)
    elif t=="!!!":
        return random.choice(point5)
    elif t=="?!?":
        return random.choice(point6)
    elif t=="!?":
        return random.choice(point7)
    

print(re.sub(r"[!?,.]+", replace ,txt))

Steve

First annotation of text was with all the class: Group analysis of !? by Nina Power

Then we were split up in groups and I was with Kendal, Nami and Louisa. Together we were given 4 texts to annotate which were !?, Resurgence, Undecidability and Liquid and each one picked a text.

I picked !? which was the text we all first annotated as a class so I created a new one and cleaned up the things we had found as a class and made my own analysis ?!. Nami picked Undecidability, Louisa picked Resurgence & Kendal picked Liquid.

We annotated the new text together and analyzed and discussed them together and later started to individual analyze our own text with all the knowledge we gained in order to make our response our text.

Individual project

Process of making a map of my word !?
Print Result
Web Result

Group project