User:Clara/S13: Difference between revisions

From XPUB & Lens-Based wiki
Line 9: Line 9:




==Try out response to '?!'==
[[User:Clara/S13/Try out response to '?!'|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)
<source lang="python">
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)
</source>
 
'''here is a part of the output'''
<br>
<br>
<span style="color: grey;">[circle the right punctuation ?/!]</span>/ <span style="color: grey;">[circle the right punctuation ?/!]</span><br><br>Nina Power<br><br>Part 1: <span style="color: grey;">[circle the right punctuation ?/!]</span><br><br>“[T]he entire thrust of the LTI The Langue of the Third Reich was towards visualisation<span style="color: grey;">[circle the right punctuation ,/.]</span>and if this process of visualizing could be achieved with recourse to Germanic traditions<span style="color: grey;">[circle the right punctuation ,/.]</span>by means of a runic sign<span style="color: grey;">[circle the right punctuation ,/.]</span>then so much the better<span style="color: grey;">[circle the right punctuation ,/.]</span>And as a jagged character the rune of life was related to the SS symbol<span style="color: grey;">[circle the right punctuation ,/.]</span>and as an ideological symbol also related to the spokes of the wheel of the sun<span style="color: grey;">[circle the right punctuation ,/.]</span>the swastika <span style="color: grey;">[circle the right punctuation ;/…]</span>Renan’s position: the question mark – the most important of all punctuation marks<span style="color: grey;">[circle the right punctuation ,/.]</span>A position in direct opposition to National Socialist intransigence and self-confidence <span style="color: grey;">[circle the right punctuation ;/…]</span>
<br>
<br>
'''here is another replace I used, it's very straight forward and basically randomly picks a replacement for punctuation within the text.'''
<source lang="python">
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))
</source>


=Steve=
=Steve=

Revision as of 17:09, 9 April 2021

Prototype

Random definition generator


Experimenting with patches


Experimenting with NLTK


Try out response to '?!'

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