User:FLEM/Poems translations: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 189: Line 189:
     .b Click and drag to create the space(s) where you want to insert your translation
     .b Click and drag to create the space(s) where you want to insert your translation
     .c Click ''insert'' or click on the ''x'' if it's not as you wanted
     .c Click ''insert'' or click on the ''x'' if it's not as you wanted
https://hub.xpub.nl/soupboat/generic-labels/annotate/one_to_one_translation.jpg/


==.production process==
==.production process==

Revision as of 20:07, 8 December 2021

.input

i recently received a new poetry book from the same author of a book that I've been carrying with me for a long time

one day, while reading my favourite poem, Fiesta, I started to play around with the two translations offered by both books

i did like that word, i did not like the structure of the sentence in the other translation, i wanted a different word for the end of that line

at the end i created a new translation based on the two originals and i started to question myself on this topic

how does a translator choose words?

why do they choose .a instead of .b? .c instead of .a?

not all translations are perfect so then, why not mix them up?

.what

A function that:

1. takes into account 2 similar texts (example: 2 different translations of a poems)

2. finds the common words and uses them as the fixed text for the new piece of text

3. puts the results together into a new piece, randomly choosing the different options

4. html output that highlights the different random choices of the translations

.the poem

.fiesta

The glasses were empty So the glasses were empty

The bottle was shattered and the bottle broken

The bed was wide open And the bed was wide open

The door was tight shuttered and the door closed

Each shard was a star And all of the glass stars

Of bliss and of beauty of happiness and beauty

That flashed on the floor were sparkling in the dust

All dusty and dirty of the poorly dusted room.

And I was dead drunk And I was dead drunk

Lit up wildly ablaze And I was a bonfire

You were drunk and alive And you were alive, drunk,

In a naked embrace! all naked in my arms.

.vernacular maps as a starting point

starting from the data received from the tool of the vernacular maps

comparing results and find out common words / differences but the content wasn't the right one to do this made a function for common words

from collections import Counter
Counters_found = Counter(labels4_split)
most_occur = Counters_found.most_common(4)
print(most_occur)

started to think about my interest in poems' translations and wanted to look for the common words in those texts.. a new idea was coming into my head

.poem translations function

This tool is thought to compare two different translation of the same poem and obtain a result that randomly chooses and mix up the two translation into a new text.

.a choose poems

.b select two translations

.c find out sentences and words that are different

.d import random from choice (from the differences of the texts' translations)

.e highlight the word that's different/ the random choice

//.f when you slide on it you can see the different options//

.vernacular poem translations

by collecting translations made by people from different languages and comparing them

.a choose a poem in english

.b provide different language translations

.c ask people to use the translation in their own language and to translate it to english

//.d compare the original translation with the new vernacular ones//

// why not going back to the vernacular maps and try out the labelling tool on this content? ANSWER FOUND (continue reading..)

.vernacular translations maps

."seeing what different translators have done with the same poem immediately eliminates easy assumptions that beginning translators often make: that there is a single way, a most correct way, or a best way to translate a poem." ."We might begin by asking where, on a continuum ranging from the most “literal” to the most “free,” a particular translation lies. Where, on another continuum between most loyal to form and most free of it, does a translation of a formal poem lie? What is gained by attempting to replicate meter and/or rhyme, and what is lost? What about levels of diction? More generally, what is the stylistic “register” of a translation, ranging from formal to colloquial, or is there a mixture of styles?"°

why not going back to vernacular maps with this? not even need my filter, the filter serves just to analyse material in a specific way. why not create vernacular maps from these vernacular translations? ask people to write on the image of the text their personal translation. what is the right way to translate a poem? then work on the content gathered and create new maps out of the texts

instructions: translate the following text to english in the way you feel, word by word, using negative space writing on the text off the text following the lines or not? //

update 02.12.21: for the vernacular tool, to gather data, i have to start from a singular file, shared between the users. therefore is not possible to choose a text to be translated to english. instead, i'm going to choose a text in english for everyone and then people will annotate on it. maybe, afterwords, i could try to find translations of the text in other languages and compare them, but it is not really necessary. //

! this is a tool for internationals? no, everyone can translate in the language they want and the original text chosen can be in different languages

instructions: translate the following text to your mother language//a different language in the way you feel, word by word, using negative space writing on the text, off the text, following the lines or not? //
.vernacular translations maps experiment
  • duty

find a poem in english to upload on the labelling tool and let people annotate and interact with the poem as they want.

  • poem chosen

This is actually not a well-known poem so it's possible that finding translations wouldn't even be so easy. But, doesn't this make the tool even more interesting?

First Party At Ken Kesey's With Hell's Angels by Allen Ginsberg

Cool black night thru redwoods

cars parked outside in shade

behind the gate, stars dim above

the ravine, a fire burning by the side

porch and a few tired souls hunched over

in black leather jackets. In the huge

wooden house, a yellow chandelier

at 3 A.M. the blast of loudspeakers

hi-fi Rolling Stones Ray Charles Beatles

Jumping Joe Jackson and twenty youths

dancing to the vibration thru the floor,

a little weed in the bathroom, girls in scarlet

tights, one muscular smooth skinned man

sweating dancing for hours, beer cans

bent littering the yard, a hanged man

sculpture dangling from a high creek branch,

children sleeping softly in their bedroom bunks.

And 4 police cars parked outside the painted

gate, red lights revolving in the leaves.

December 1965

  • usage instructions

there is NOT a single way, a most correct way, or a best way to translate a poem.

Following this quote, I would like you to translate this poem to the language you prefer/feel more comfortable with/your mother tongue. You can use a translator to obtain the translation of single words, but i hope you will do

your best to make a thoughtful choice on the word you will choose. Every word has its own power!

Interact with this text as you prefer and translate it in the way you feel, word by word, using negative space, writing on the text, off the text, following the lines or not?

   .a Go to https://hub.xpub.nl/soupboat/generic-labels/annotate/vernacular_maps_tryout.jpg/
   .b Click and drag to create the space(s) where you want to insert your translation
   .c Click insert or click on the x if it's not as you wanted

https://hub.xpub.nl/soupboat/generic-labels/annotate/one_to_one_translation.jpg/

.production process

.from my notebook

.from my notebook 18.11.21

book translations

.a choose poems

.b take different translations

.c select sentences and words that are different

.d import random from choice (from the text's translation

.e highlight the word that's different

.f when you slide on it you can see the different options EXTRAJAVA

.from my notebook 26.11.21

text1 = " the glasses were broken "

text2 = " the glass is broken "

starting text = " the _____ ____ broken"

random choice between glasses were // glass is

random chosen poem translation

.a print differences

.b print equals

.c organise random choice scheme?

fixed_terms + choice(differences) // remove differences leaving a space reference --> replace?

! in a line, it should choose one version

could it be possible to highlight differences later? now use the whole sentence now

.from my notebook 29.11.21

.a go through the text --> find difference

e i bicchieri eran vuoti

ed i bicchieri erano vuoti

.b reposition with random choice

// tokenize words

should this be random choice with no meaning or actually putting the text back in order to show the real translations?

.from my notebook 30.11.21

gathering information from people reading poems out loud and producing transcriptions with the use of an automatic translator // compare them between different languages? with vernacular poems? with originals?

.not from my notebook 01.12.21

.seeing what different translators have done with the same poem immediately eliminates easy assumptions that beginning translators often make: that there is a single way, a most correct way, or a best way to translate a poem."

.We might begin by asking where, on a continuum ranging from the most “literal” to the most “free,” a particular translation lies. Where, on another continuum between most loyal to form and most free of it, does a translation of a formal poem lie? What is gained by attempting to replicate meter and/or rhyme, and what is lost? What about levels of diction? More generally, what is the stylistic “register” of a translation, ranging from formal to colloquial, or is there a mixture of styles?°

--> why not going back to vernacular maps with this? not even need the filter, the filter exists just to analyse material in a specific way. why not create vernacular maps from these vernacular translations? ask people to write on

the image of the text their personal translation. what is the right way to translate a poem? then work on the content gathered and create new maps out of the texts

instructions: translate the following text to english in the way you feel, word by word, using negative space writing on the text of the text following the lines or not? //

.not from my notebook 02.12.21

The point of this project is that it's not necessary to start with poems translations // this is a really specific way of using this function and the one i will use to explain the use of this tool// it is a tool that permits user to compare two similar texts, highlighting differences.

.from my jupiter lab

.differ function

Poem_translations_diff Poem_translation_diff is a function that compares two different translations of the same text and gives the differences between the two texts

how to use: to use this function it is necessary to have two texts with the same number of lines (as it goes through the two texts and compares them line by line). Probably it will be ok to use both .txt files and strings but not figured it out yet --

input: 2 texts that are similar but not the exact copy of each other --

output: // still not clear yet //

1. import difflib (and html to display result) 2. define texts + split in lines (now, then it will probably be words?)

import difflib

from IPython.display import HTML, display

3. html style to show the result visually

style= """<style>
span.del
    {
    background-color:#b0c4de;
    }
    span.add
    { 
    background-color:#b064de;
    }
    </style>"""

4. initiate the differ object

5. for loop, by using code (+/-) resulted by differ

6. adding style to (+/-) results to see them visually

Each line of a Differ delta begins with a two-letter code:

'- ' line unique to sequence 1 '+ ' line unique to sequence 2 ' ' line common to both sequences '? ' line not present in either input sequence

def difftexthtml(text1,text2):
   d = difflib.Differ()
   # calculate the difference between the two texts
   diff = d.compare(text1, text2)
   src= 
   for result in diff:
       code, word = result.split(' ', 1)
       word = word.strip()
       #src = src + word + ' '
       if code == '-' :
           src = src + f'{word}'
       elif code == '+' :
           src = src + f'{word}'
       else:
           src = src + word + ' '
   return src

6. for loop, by using code (-) resulted by differ to identify "deleted words" // they are just sentences of text1

  1. initiate the Differ object
def diff_deleted_words(text1,text2):
   d = difflib.Differ()
   # calculate the difference between the two texts
   diff = d.compare(text1, text2)
   del_words= []
   for result in diff:
       code, word = result.split(' ', 1)
       word = word.strip()
       #src = src + word + ' '
       if code == '-' :
           del_words.append(word)
   return del_words

.find differences and equal words in texts

"Find differences and equal words in texts" is a function that compare two different translations of the same text and gives the differences and equal words between the two texts

how to use: this function (at the moment) works with strings

input: 2 texts that are similar but not the exact copy of each other --

output: // still not clear yet // should be a new piece of text that puts the results together, randomly choosing from the differences

1. import difflib + sequencematcher+ split texts

2. import collections and orderset definition -- so that set() is not random but OrderSet() //in order

  1. ORDERSET DEFINITION
import collections
class OrderedSet(collections.Set):
   def __init__(self, iterable=()):
       self.d = collections.OrderedDict.fromkeys(iterable)
   def __len__(self):
       return len(self.d)
   def __contains__(self, element):
       return element in self.d
   def __iter__(self):
       return iter(self.d)

3. Get differences in the two lists of words

#Get the different words in two lists of words
def Diff(text1, text2):
   return list(OrderedSet(text1) - OrderedSet(text2)) + list(OrderedSet(text2) - OrderedSet(text1)) 
text22="ed i bicchieri erano vuoti e la bottiglia infranta ed il letto spalancato e l'uscio era sprangato"
text2 = text22.split()
text11="E i bicchieri eran vuoti la bottiglia in pezzi Il letto spalancato e la porta sbarrata"
text1 = text11.split()
print(Diff(text1, text2)) #print the difference
differences = (Diff(text1,text2))

4. Get fixed_terms (equal words) in the two lists of words

# to get the words that are not the different ones 
def fixed(text1,text2,differences):
   return list(OrderedSet(text1)-OrderedSet(differences)) + list(OrderedSet(text2)-OrderedSet(differences))
print(fixed(text1,text2,differences))
fixed_terms1 = (fixed(text1,text2,differences))

5. for loop of random choice to choose from the differences and equals // it doesn't work with texts/lines with a different structure than "fixed+difference+difference+fixed"

  1. i need to find out how to print the text using the structure of the original text
from random import choice
result=()
for words in fixed_terms1:
   for words in differences:
       print(fixed_terms1[0] + ' ' + choice(differences) + ' ' + choice(differences) + ' ' + fixed_terms1[1])

.poem_translations_zip

zip is a function for loop with zip function to go through the texts and print out html style

how to use: to use this function it is necessary to have two texts with the same number of lines (as it goes throught the two texts and compares them line by line)

input: 2 texts that are similar but not the exact copy of each other --

output: a new text that showcase the differences

1. import difflib (and html to display result) 2. define texts + split in lines (now, then it will probably be words?)¶

3. html style to show the result visually

style= """<style>
span.del
   {
   background-color:#b0c4de;
   }
   span.add
   {
   background-color:#b064de;
   }
   </style>"""

4. zip line by line the whole text

for line_A, line_B in zip(text1, text2):
   words_A = line_A.split()
   words_B = line_B.split()
   src = difftexthtml(words_A, words_B)
   delwords = diff_deleted_words(words_A, words_B)
   #print(line_A)
   #print(line_B)
   #print(delwords)
   display(HTML(style + src))

.output

.methodology

.a new text with highlighted differences

.b both texts alongside

.c new text from random choice

.content

.a fixed poem translation // analysis and comparison of two different translations

.b vernacular translations (made by people) // print out all the different translations in all languages

.physical output

--> possibility to extract the resulting file (pdf, txt file, word?)

// framed prints of the processes showcased step by step, also with mistakes --> printed(results) in the Jupiter Lab

// a collective book of different translations of the same poem? printed out as vernacular maps!

! do a session with people trying out the tool and print the results out

.possibilities

.why this is an enriching and fascinating tool

confronting texts in education to understand differences?

to understand the job of a translator?

create vernacular and popular translations of texts that have never been translated before

to enrich the experience of reading a translated text?

.More specifically, multiple translations can give us a much better sense of the poem than a single translation can, so that even if we can’t read the poem in the original language, we can come closer to that experience. °

.poem translations in the special issue 16

material equipment devices budget how to present the work

.on the topic

https://pamelaklein.wordpress.com/2012/07/12/translation-generator-poetry/

https://lithub.com/what-we-can-learn-from-multiple-translations-of-the-same-poem/

https://www.npr.org/2018/04/15/602261007/-nprpoetry-literary-translator-aaron-coleman?t=1638394813534