Repo for A Tune In workshop by amy, Aggeliki and Cristina for the Any One Day The Future Died conference.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

269 lines
9.9 KiB

{
"cells": [
{
"cell_type": "markdown",
"id": "d4e131d0",
"metadata": {},
"source": [
"# * .* A tune in **. . * \n",
"\n",
"A workshop by [Varia](http://varia.zone/en/).\n",
"\n",
"We are now on a Jupyter Notebook. The code you are running is downloaded on one of our computers, and you are accessing it from a local server. To run the code, select the code cells in order and press \"Run\" in the toolbar above.\n",
"\n",
"\n",
"## Pincelate\n",
"\n",
"[Pincelate](https://pypi.org/project/pincelate/) is a machine learning model for spelling English words and sounding them out developed by artist [Allison Parrish](https://www.decontextualize.com/). It relies on particular versions of the Google-funded pre-trained machine learning models in [Tensorflow](https://www.tensorflow.org/) and the deep-learning API [Keras](https://keras.io/). If you are interested to see more ways to work with Pincelate, Parrish created a series of tutorials: [https://github.com/aparrish/nonsense-verse-pycon-2020](https://github.com/aparrish/nonsense-verse-pycon-2020).\n",
"\n",
"\n",
"### Installing Pincelate"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "ranking-bottom",
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
]
}
],
"source": [
"import ipywidgets as widgets\n",
"from IPython.display import display,HTML\n",
"from ipywidgets import interact,interactive_output,Layout,HBox,VBox\n",
"import sys\n",
"!{sys.executable} -m pip install tensorflow==1.15.5\n",
"!{sys.executable} -m pip install keras==2.2.5\n",
"!{sys.executable} -m pip install pincelate\n",
"from pincelate import Pincelate\n",
"pin = Pincelate()"
]
},
{
"cell_type": "markdown",
"id": "9f1e2cc7",
"metadata": {},
"source": [
"### Respelling\n",
"\n",
"This is how Parrish describes the *manipulate* function of Pincelate: \"Pincelate actually consists of two models: one that knows how to sound out words based on how they're spelled, and another that knows how to spell words from sounds.\"\n",
"\n",
"With this function, words are passing through the two models, taking words, sounding them out from their spelling and then bringing them back into writing via phonemes. As a way to situate ourselves into the conference, we propose to take the conference titles as material to reshape, contort, or respell. \n",
"\n",
"By respelling, we are not only writing out words again, but also remaking the spells that words cast. \n",
"You can make the temperature higher to \"melt\" the words.\n",
"\n",
"\n",
"**CONFERENCE TITLES**\n",
"\n",
"Please keep Crashing (Workshop Documentation)\n",
"\n",
"The Future has died (Conference Opening)\n",
"\n",
"Race Against the Time Machine (tbc, Workshop)\n",
"\n",
"Decolonizing Digital Archives (Conversation) \n",
"\n",
"AI – Between Apocalypse, Lethargy, and Wonder (Panel)\n",
"\n",
"DeColoniality of AI (Panel)\n",
"\n",
"Decolonial Weavings, Vernacular Algorithms\n",
"\n",
"Ecologies of Dreaming Beyond AI\n",
"\n",
"Technopoetics of Sound. Listening Session for Any | One Day\n",
"\n",
"Entangled Media Philosophies of Technology\n",
"\n",
"Predicting Backwards: Generating Histories\n",
"\n",
"Sedimented Temporalities of Geodigital Landscapes"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "muslim-labor",
"metadata": {},
"outputs": [],
"source": [
"wor = input('what is your word? ')\n",
"temp = input('temperature value? ')\n",
"\n",
"pin.manipulate(wor.lower(),temperature = int(temp))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b648b5ae",
"metadata": {},
"outputs": [],
"source": [
"@interact(s=\"any one future died\",temp=(0.05,2.5,0.05))\n",
"def tempadjust(s,temp):\n",
" return ' '.join([pin.manipulate(w.lower(),temperature=temp) for w in s.split()])"
]
},
{
"cell_type": "markdown",
"id": "573dbac9",
"metadata": {},
"source": [
"## Difference of dictionaries\n",
"\n",
"> It is often forgotten that dictionaries are artificial repositories, put together well after the languages they define. The roots of language are irrational and of a magical nature.” Jorge Luis Borges, El otro, el mismo. (Buenos Aires: Emecé, 2005), 5.\n",
"\n",
"Starting from the many worlds and layers that words carry with them, with this exercise, we propose to start the conference by sharing meanings, associations and (mis)understandings we have around them with each other.\n",
"\n",
"The code below is borrowed from a [temporary configuration](http://varia.zone/en/wordmord-dear-language.html) of [WordMord](https://wordmord-ur.la/), which came together around a *para-dictionary* that used to bend a text in different directions. \n",
"\n",
"The code is not using machine learning models, in face it is a very basic script that proposes to start with three kinds of meaning making processes:\n",
"\n",
"* paranyms - words having nearly the same meaning a feeling about a word that is beyond, below, behind formalised definitions. Closely resembling the term but not the same.\n",
"\n",
"* parameanings - could be our understanding of terms that run parallel to the formal definition It could be a 'paranormal' understanding - one outside our known comprehensions.\n",
"\n",
"* paradoxes - in this conference, paradoxes are \"as a condition of existence that has the potential to shake the common sense of AI\". What are paradoxes that surround specific terms?\n",
"\n",
"Before running the code, please edit the collective dictionary here [https://pad.vvvvvvaria.org/any_one_day_this_dictionary_has_died](https://pad.vvvvvvaria.org/any_one_day_this_dictionary_has_died). Then, choose a sentence/expression/title to respell and run the following cell."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "2e25f0db",
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import time\n",
"import json\n",
"import wget\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "189c5b06",
"metadata": {},
"outputs": [],
"source": [
"url = \"https://pad.vvvvvvaria.org/any_one_day_this_dictionary_has_died/export/txt\"\n",
"\n",
"path= \"/home/angeliki/Documents/Any_One_day_future/A_tune_in\"\n",
"\n",
"filename = path + '/' + os.path.basename(url) \n",
"if os.path.exists(filename):\n",
" os.remove(filename) \n",
"wget.download(url, out=filename) \n",
"\n",
" \n",
"with open(filename, 'r') as f:\n",
" dictionary = json.loads(f.read().replace(\"'\", '\"'))\n",
" \n",
"def makeparanyms():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['paranyms']))\n",
"\tprint(new_sentence)\n",
"\n",
"def makeparameanings():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['parameanings']))\n",
"\tprint(new_sentence)\n",
"\n",
"def makeparadoxes():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['paradoxes']))\n",
"\tprint(new_sentence)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b1dde66a",
"metadata": {},
"outputs": [],
"source": [
"\n",
"sentence = input('what are your words? ')\n",
"\n",
"type = input('choose replacing method between \"paranyms\",\"parameanings\",\"paradoxes\",\"all\": ')\n",
"\n",
"if type == 'paranyms':\n",
"\tmakeparanyms()\n",
"elif type == 'parameanings':\n",
"\tmakeparameanings()\n",
"elif type == 'paradoxes':\n",
"\tmakeparadoxes()\n",
"elif type =='all':\n",
"\tmakeparanyms()\n",
"\ttime.sleep(1)\n",
"\tmakeparameanings()\n",
"\ttime.sleep(1)\n",
"\tmakeparadoxes()\n",
"else:\n",
" print(\"Wrong input. Please run the code again\")"
]
},
{
"cell_type": "markdown",
"id": "28782db3",
"metadata": {},
"source": [
"## Chant with, for, against, around, about AI\n",
"\n",
"By chanting, we refer to a repeated rhythmic phrase, one sung loudly and in unison with a group.\n",
"Chants are used in spiritual practices, protests, football matches, demonstrations, battles. They are words surfacing through our bodies out into the world.\n",
"In this final part, we will make our own chant with, for, against, around, about AI that we can keep repeating throughout the conference.\n",
"\n",
"In groups of 4, and using the tools above, take a few minutes to make a chant to share with everyone else. A tune out."
]
},
{
"cell_type": "markdown",
"id": "f597b743",
"metadata": {},
"source": [
"You can use this pad [https://pad.vvvvvvaria.org/any_one_day_this_chant_will_live](https://pad.vvvvvvaria.org/any_one_day_this_chant_will_live) to draft your chants. We can share our intentions or we can keep them private."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}