You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
36 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import nltk"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"txt = open('manifesto1.txt').read()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['MANIFESTO', 'Liquid', 'life', 'is', 'an', 'uncertain', 'realm', '.', 'The', 'concepts', 'needed', 'to', 'realise', 'its', 'potential', 'have', 'not', 'yet', 'existed', 'until', 'now', '.', 'The', 'hypercomplexity', 'and', 'hyperobject-ness', 'of', 'liquid', 'terrains', 'exceeds', 'our', 'ability', 'to', 'observe', 'or', 'comprehend', 'them', 'in', 'their', 'totality', '.', 'Indeed', ',', 'what', 'we', 'typically', 'recognise', 'as', 'living', 'things', 'are', 'by-products', 'of', 'liquid', 'processes', '.', 'Liquid', 'life', 'is', 'a', 'worldview', '.', 'A', 'phantasmagoria', 'of', 'effects', ',', 'disobedient', 'substances', ',', 'evasive', 'strategies', ',', 'dalliances', ',', 'skirmishes', ',', 'flirtations', ',', 'addictions', ',', 'quantum', 'phenomena', ',', 'unexpected', 'twists', ',', 'sudden', 'turns', ',', 'furtive', 'exchanges', ',', 'sly', 'manoeuvres', ',', 'blind', 'alleys', ',', 'and', 'exuberant', 'digressions', '.', 'It', 'can', 'not', 'be', 'reduced', 'into', 'simple', 'ciphers', 'of', 'process', ',', 'substance', ',', 'method', ',', 'or', 'technology', '.', 'It', 'is', 'more', 'than', 'a', 'set', 'of', 'particular', 'materials', 'that', 'comprise', 'a', 'recognizable', 'body', '.', 'It', 'is', 'more', 'than', 'vital', 'processes', 'that', 'are', 'shaped', 'according', 'to', 'specific', 'contexts', 'and', 'subjective', 'encounters', '.', 'Yet', 'we', 'recognise', 'its', 'coherence', 'through', 'the', 'lives', 'of', '', 'beings', '', ',', 'which', 'remain', 'cogent', 'despite', 'incalculable', 'persistent', 'changes', 'such', 'as', 'flows', ',', 'ambiguities', ',', 'transitional', 'states', 'and', 'tipping', 'points', 'that', 'bring', 'about', 'radical', 'transformation', 'within', 'physical', 'systems', '.', 'Liquid', 'life', 'is', 'a', 'kind', 'of', '', 'metabolic', 'weather', '', '.', 'It', 'is', 'a', 'dynamic', 'substrate', '-', 'or', 'hyperbody', '-', 'that', 'permeates', 'the', 'atmosphere', ',', 'liquid', 'environments', ',', 'soils', 'and', 'Earth', '', 's', 'crust', '.', '', 'Metabolic', 'weather', '', 'refers', 'to', 'complex', 'physical', ',', 'chemical', 'and', 'even', 'biological', 'outcomes', 'that', 'are', 'provoked', 'when', 'fields', 'of', 'matter', 'at', 'the', 'edge', 'of', 'chaos', 'collide', '.', 'It', 'is', 'a', 'vector', 'of', 'infection', ',', 'an', 'expression', 'of', 'recalcitrant', 'materiality', 'and', 'a', 'principle', 'of', 'ecopoiesis', ',', 'which', 'underpins', 'the', 'process', 'of', 'living', ',', 'lifelike', 'events', '', 'and', 'even', 'life', 'itself', '.', 'These', 'life', 'forms', 'arise', 'from', 'energy', 'gradients', ',', 'density', 'currents', ',', 'katabatic', 'flows', ',', 'whirlwinds', ',', 'dust', 'clouds', ',', 'pollution', 'and', 'the', 'myriad', 'expressions', 'of', 'matter', 'that', 'detail', 'our', '(', 'earthy', ',', 'liquid', ',', 'gaseous', ')', 'terrains', '.', 'Liquid', 'life', 'is', 'immortal', '.', 'Arising', 'from', 'our', 'unique', 'planetary', 'conditions', ',', 'its', 'ingredients', 'are', 'continually', 're-incorporated', 'into', 'active', 'metabolic', 'webs', 'through', 'cycles', 'of', 'life', 'and', 'death', '.', 'Most', 'deceased', 'liquid', 'matter', 'lies', 'quiescent', ',', 'patiently', 'waiting', 'for', 'its', 'reanimation', 'through', 'the', 'persistent', 'metabolisms', 'within', 'our', 'soils', '.', 'Liquid', 'life', 'exceeds', 'rhetoric', '.', 'Its', 'concepts', 'can', 'be', 'embodied', 'and', 'experimentally', 'tested', 'using', 'a', 'trans-disciplinary', 'approach', ',', 'which', 'draws', 'upon', 'a', 'range', 'of', 'conceptual', 'lenses', 'and', 'techniques', 'to', 'involve', 'the', 'liquid', 'realm', 'with', 'its', 'own', '', 'voice', '', '.', 'From', 'these', 'perspectives', 'liquid', 'technologies', 'emerge', 'that', 'are', 'capable', 'of', 'generating', 'new', 'kinds', 'of', 'artefacts', ',', 'like', 'Bütschli', 'droplets', ',', 'which', 'are', 'liquid', 'chemical', 'assemblages', 'capable', 'of', 'surprisingly', 'lifelike', 'behaviours', '.', 'These', 'agents', 'exceed', 'rhetoric'
]
}
],
"source": [
"tokens = nltk.word_tokenize(txt)\n",
"print(tokens)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"text = nltk.Text(tokens)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[('MANIFESTO', 'NNP'), ('Liquid', 'NNP'), ('life', 'NN'), ('is', 'VBZ'), ('an', 'DT'), ('uncertain', 'JJ'), ('realm', 'NN'), ('.', '.'), ('The', 'DT'), ('concepts', 'NNS'), ('needed', 'VBN'), ('to', 'TO'), ('realise', 'VB'), ('its', 'PRP$'), ('potential', 'NN'), ('have', 'VBP'), ('not', 'RB'), ('yet', 'RB'), ('existed', 'VBN'), ('until', 'IN'), ('now', 'RB'), ('.', '.'), ('The', 'DT'), ('hypercomplexity', 'NN'), ('and', 'CC'), ('hyperobject-ness', 'NN'), ('of', 'IN'), ('liquid', 'NN'), ('terrains', 'NNS'), ('exceeds', 'VBZ'), ('our', 'PRP$'), ('ability', 'NN'), ('to', 'TO'), ('observe', 'VB'), ('or', 'CC'), ('comprehend', 'VB'), ('them', 'PRP'), ('in', 'IN'), ('their', 'PRP$'), ('totality', 'NN'), ('.', '.'), ('Indeed', 'RB'), (',', ','), ('what', 'WP'), ('we', 'PRP'), ('typically', 'RB'), ('recognise', 'VBP'), ('as', 'IN'), ('living', 'NN'), ('things', 'NNS'), ('are', 'VBP'), ('by-products', 'NNS'), ('of', 'IN'), ('liquid', 'NN'), ('processes', 'NNS'), ('.', '.'), ('Liquid', 'NNP'), ('life', 'NN'), ('is', 'VBZ'), ('a', 'DT'), ('worldview', 'NN'), ('.', '.'), ('A', 'DT'), ('phantasmagoria', 'NN'), ('of', 'IN'), ('effects', 'NNS'), (',', ','), ('disobedient', 'NN'), ('substances', 'NNS'), (',', ','), ('evasive', 'JJ'), ('strategies', 'NNS'), (',', ','), ('dalliances', 'NNS'), (',', ','), ('skirmishes', 'NNS'), (',', ','), ('flirtations', 'NNS'), (',', ','), ('addictions', 'NNS'), (',', ','), ('quantum', 'JJ'), ('phenomena', 'NN'), (',', ','), ('unexpected', 'JJ'), ('twists', 'NNS'), (',', ','), ('sudden', 'JJ'), ('turns', 'NNS'), (',', ','), ('furtive', 'JJ'), ('exchanges', 'NNS'), (',', ','), ('sly', 'RB'), ('manoeuvres', 'NNS'), (',', ','), ('blind', 'IN'), ('alleys', 'NNS'), (',', ','), ('and', 'CC'), ('exuberant', 'JJ'), ('digressions', 'NNS'), ('.', '.'), ('It', 'PRP'), ('can', 'MD'), ('not', 'RB'), ('be', 'VB'), ('reduced', 'VBN'), ('into', 'IN'), ('simple', 'JJ'), ('ciphers', 'NNS'), ('of', 'IN'), ('process', 'NN'), (',', ','), ('substance', 'NN'), (',', ','), ('method', 'NN'), (',', ','), ('or', 'CC'), ('technology', 'NN'), ('.', '.'), ('It', 'PRP'), ('is', 'VBZ'), ('more', 'RBR'), ('than', 'IN'), ('a', 'DT'), ('set', 'NN'), ('of', 'IN'), ('particular', 'JJ'), ('materials', 'NNS'), ('that', 'WDT'), ('comprise', 'VBP'), ('a', 'DT'), ('recognizable', 'JJ'), ('body', 'NN'), ('.', '.'), ('It', 'PRP'), ('is', 'VBZ'), ('more', 'RBR'), ('than', 'IN'), ('vital', 'JJ'), ('processes', 'NNS'), ('that', 'WDT'), ('are', 'VBP'), ('shaped', 'VBN'), ('according', 'VBG'), ('to', 'TO'), ('specific', 'JJ'), ('contexts', 'NN'), ('and', 'CC'), ('subjective', 'JJ'), ('encounters', 'NNS'), ('.', '.'), ('Yet', 'CC'), ('we', 'PRP'), ('recognise', 'VBP'), ('its', 'PRP$'), ('coherence', 'NN'), ('through', 'IN'), ('the', 'DT'), ('lives', 'NNS'), ('of', 'IN'), ('', 'JJ'), ('beings', 'NNS'), ('', 'NN'), (',', ','), ('which', 'WDT'), ('remain', 'VBP'), ('cogent', 'JJ'), ('despite', 'IN'), ('incalculable', 'JJ'), ('persistent', 'JJ'), ('changes', 'NNS'), ('such', 'JJ'), ('as', 'IN'), ('flows', 'NNS'), (',', ','), ('ambiguities', 'NNS'), (',', ','), ('transitional', 'JJ'), ('states', 'NNS'), ('and', 'CC'), ('tipping', 'VBG'), ('points', 'NNS'), ('that', 'IN'), ('bring', 'VBG'), ('about', 'RB'), ('radical', 'JJ'), ('transformation', 'NN'), ('within', 'IN'), ('physical', 'JJ'), ('systems', 'NNS'), ('.', '.'), ('Liquid', 'NNP'), ('life', 'NN'), ('is', 'VBZ'), ('a', 'DT'), ('kind', 'NN'), ('of', 'IN'), ('', 'NNP'), ('metabolic', 'FW'), ('weather', 'PRP$'), ('', 'NN'), ('.', '.'), ('It', 'PRP'), ('is', 'VBZ'), ('a', 'DT'), ('dynamic', 'JJ'), ('substrate', 'JJ'), ('-', ':'), ('or', 'CC'), ('hyperbody', 'NN'), ('-', ':'), ('that', 'WDT'), ('permeates', 'VBZ'), ('the', 'DT'), ('atmosphere', 'NN'), (',', ','), ('liquid', 'JJ'), ('environments', 'NNS'), (',', ','), ('soils', 'NNS'), ('and', 'CC'), ('Earth', 'NNP'), ('', 'NNP'), ('s', 'NN'), ('crust', 'NN'), ('.', '.'), ('', 'CC'), ('Metabolic', 'NNP'), ('weather', 'VBP'), ('', 'JJ'), ('refers', 'NNS'), ('to', 'TO'), ('complex', 'JJ'), ('physical', 'NN'), (',', ','), ('chemical'
]
}
],
"source": [
"tagged = nltk.pos_tag(tokens)\n",
"print(tagged)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['is', 'exceeds', 'is', 'is', 'is', 'is', 'is', 'permeates', 'is', 'underpins', 'detail', 'is', 'lies', 'exceeds', 'draws', 'creates', 'is', 'indulges', 'is', 'acts', 'depends', 'bodies', 'discuss', 'is', 'bodies', 'is', 'bodies']\n"
]
}
],
"source": [
"selection = []\n",
"\n",
"for word, tag in tagged:\n",
" if 'VBZ' in tag:\n",
" selection.append(word)\n",
"\n",
"print(selection)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['MANIFESTO', 'Liquid', 'life', 'realm', 'concepts', 'potential', 'hypercomplexity', 'hyperobject-ness', 'liquid', 'terrains', 'ability', 'totality', 'living', 'things', 'by-products', 'liquid', 'processes', 'Liquid', 'life', 'worldview', 'phantasmagoria', 'effects', 'disobedient', 'substances', 'strategies', 'dalliances', 'skirmishes', 'flirtations', 'addictions', 'phenomena', 'twists', 'turns', 'exchanges', 'manoeuvres', 'alleys', 'digressions', 'ciphers', 'process', 'substance', 'method', 'technology', 'set', 'materials', 'body', 'processes', 'contexts', 'encounters', 'coherence', 'lives', 'beings', '', 'changes', 'flows', 'ambiguities', 'states', 'points', 'transformation', 'systems', 'Liquid', 'life', 'kind', '', '', 'hyperbody', 'atmosphere', 'environments', 'soils', 'Earth', '', 's', 'crust', 'Metabolic', 'refers', 'physical', 'chemical', 'outcomes', 'fields', 'matter', 'edge', 'chaos', 'collide', 'vector', 'infection', 'expression', 'materiality', 'principle', 'ecopoiesis', 'process', 'living', 'events', '', 'life', 'life', 'forms', 'energy', 'gradients', 'density', 'currents', 'flows', 'whirlwinds', 'dust', 'clouds', 'pollution', 'expressions', 'matter', 'terrains', 'Liquid', 'life', 'conditions', 'ingredients', 'webs', 'cycles', 'life', 'death', 'liquid', 'matter', 'quiescent', 'reanimation', 'metabolisms', 'soils', 'Liquid', 'life', 'concepts', 'approach', 'range', 'lenses', 'techniques', 'realm', 'voice', '', 'perspectives', 'technologies', 'kinds', 'artefacts', 'Bütschli', 'droplets', 'chemical', 'assemblages', 'behaviours', 'agents', 'rhetoric', 'agency', 'semiotics', 'impulses', 'value', 'discourse', 'terms', 'difficulty', 'slippages', 'meaning', 'volition', 'bodies', 'possibility', 'dialectics', 'Liquid', 'life', 'provokes', 'notion', 'consciousness', 'thinking', '', 'sea', 'possibilities', 'decay', 'towards', 'equilibrium', 'moments', 'tactic', 'palette', 'resources', 'food', 'sources', 'waste', 'materials', 'energy', 'fields', 'alliances', 'decisions', 'coordinating', 'centre', 'brain', 'Liquid', 'non-bodies', 'boundaries', 'bodies', 'structures', 'logic', 'laws', 'behaviour', 'expressions', 'material', 'systems', 'frames', 'reference', 'culture', 'Aspects', 'existence', 'stray', 'realms', 'auras', 'quantum', 'physics', 'ectoplasms', 'realms', 'measurement', 'engagement', 'trysts', 'tactics', 'rise', 'life', 'capacity', 'self-repair', 'Liquid', 'bodies', 'acts', 'transformation', 'matter', 'body', 'entanglements', 'Bête', 'Machine', 'understanding', 'anatomy', 'generalizations', 'ideals', 'bodies', 'tropes', 'Liquid', 'mode', 'existence', 'outcomes', '', 'error', '', '', 'spectrum', 'stream', 'events', 'interactions', 'matter', 'bodies', 'manifolds', 'substance', 'identity', 'contexts', 'entanglements', 'relations', 'agencies', 'logic', 'objects', 'context', 'ways', 'thinking', 'conventions', 'Liquid', 'fuzziness', 'paradoxes', 'uncertainties', 'living', 'realm', 'tornado', 'cirrus', 'soil', 'embryo', 'biofilm', 'contradictions', 'form', 'constancy', '', 'encourage', 'readings', 'order', 'world', 'methodology', 'body', 'liquid', 'bodies', 'averages', 'generalizations', 'maps', 'world', 'details', 'forth', 'materiality', 'environment', 'Liquid', 'bodies', 'agents', 'boundaries', 'conditions', 'existence', 'context', 'environments', 'modes', 'living', 'coherent', '', 'media', 'Liquid', 'thinking', 'invent', 'monsters', 'forms', 'categorization', 'kind', 'corporeality', 'explanations', 'account', 'experiences', '', '']\n"
]
}
],
"source": [
"selection = []\n",
"\n",
"for word, tag in tagged:\n",
" if 'NN' in tag:\n",
" selection.append(word)\n",
"\n",
"print(selection)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<FreqDist with 492 samples and 1067 outcomes>\n"
]
}
],
"source": [
"txt = open('manifesto1.txt').read()\n",
"tokens = nltk.word_tokenize(txt)\n",
"fd = nltk.FreqDist(tokens)\n",
"print(fd)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[(',', 71), ('.', 52), ('of', 49), ('and', 37), ('the', 29), ('are', 19), ('that', 17), ('a', 16), ('Liquid', 13), ('to', 13), ('is', 12), ('their', 12), ('life', 10), ('liquid', 10), ('bodies', 10), ('They', 10), ('as', 9), ('', 9), ('', 8), ('our', 7), ('in', 7), ('which', 7), ('not', 6), ('can', 6), ('through', 6), ('', 6), ('its', 5), ('It', 5), ('matter', 5), ('being', 5), ('an', 4), ('or', 4), ('we', 4), ('living', 4), ('be', 4), ('These', 4), ('from', 4), ('these', 4), ('they', 4), ('us', 4), ('realm', 3), ('The', 3), ('them', 3), ('recognise', 3), ('into', 3), ('body', 3), ('within', 3), ('physical', 3), ('for', 3), ('with', 3), ('own', 3), ('capable', 3), ('like', 3), ('thinking', 3), ('existence', 3), ('invite', 3), ('concepts', 2), ('terrains', 2), ('exceeds', 2), ('Indeed', 2), ('what', 2), ('processes', 2), ('quantum', 2), ('process', 2), ('substance', 2), ('more', 2), ('than', 2), ('materials', 2), ('recognizable', 2), ('vital', 2), ('specific', 2), ('contexts', 2), ('subjective', 2), ('remain', 2), ('persistent', 2), ('such', 2), ('flows', 2), ('bring', 2), ('transformation', 2), ('systems', 2), ('kind', 2), ('metabolic', 2), ('weather', 2), ('dynamic', 2), ('-', 2), ('environments', 2), ('soils', 2), ('chemical', 2), ('even', 2), ('outcomes', 2), ('when', 2), ('fields', 2), ('materiality', 2), ('lifelike', 2), ('events', 2), ('forms', 2), ('arise', 2), ('energy', 2), ('expressions', 2), ('conditions', 2)]\n"
]
}
],
"source": [
"print(fd.most_common(100))"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10\n"
]
}
],
"source": [
"print(fd['liquid'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}