Passa ai contenuti principali

the Rammstein Mystery (0)

In Italy, in Germany, in Poland.  Teaching German can all of a sudden seem exciting when we listen to Rammstein in class. Some students, as always, do not care, but there are only few of them. Some will be repelled, but a major group will start nodding and shouting as they start understanding the texts of songs they have always, at least in a certain period of their live, listened to. 

When "du hasst" turns to "du hast mich gefragt", and back again, there is a light in the classroom. You may not love the industrial hammering of the music, you may be shocked by hearing aggressive German shouting, but the literary quality of these texts is evident. If you have studied German literature, you cannot ignore the allusions not only to GDR songs and brothers Grimm, but also to Trakl and French Symbolism. 

But how can we analyze Rammstein texts? Isolate motifs and topics? See how they work? I want to try to make them read by the machine. The programming languages R and Python offer a lot of packages with interesting methods of getting into the texts. I am curious about how we can, by machine Learning, find something out. 

I built a corpus of 92 songs I copied, one by one (not scraped, as we need to be sure about he purity of the material) from the Textemania website. The writing had to be corrected, as German äüö and ß are not always reported in the right way. 92 files with the year of the album and the title. 

During the  next weeks, I will try. 


The technical side

The 92 files have names like

R1995 Laichzeit.txt

R text: 

library ("quanteda")

library ("readtext")

library("quanteda.textstats")

library("quanteda.textplots")

library("rtweet")

basis <-readtext("/Users/Achim/Desktop/Rammstein/*.txt",

                 docvarsfrom = "filenames" )

arbname <- basis$doc_id

arbname <- gsub("^R","", arbname)

jahr <- substring(arbname, 0,4)

titel <- substring(arbname, 6,40)

basis <- corpus(basis)

docvars(basis, "year") <- jahr

docvars(basis, "title") <- titel


Commenti

Post popolari in questo blog

the Rammstein Mystery: Analysing songtexts with R (1)

  When we take a look at the most frequent words with a wordcloud (wordmax =20), having eliminated the stopwords, the most evident ones describe elementary states: "Lust", "Kälte", "Licht", "Mann"  Within this list, "Liebe" could be surprising, being or not being an elementary state? "Herz" of symbolic quality. "America" only appears in one song. Numerically, it looks like this: feature frequency docfreq      relative frequency   relative ranking 1 liebe 46                   11                     0.63428098                    1 2 mann 45                 11                       0.46447375                    6 3 g...

"Ich" and "du" as stopwords?

Usually, text analyzing programs consider "ich" ("I", "me") a stopword, a functional word without special meaning.  This is due to the fact that grammars categorize "ich" as a pronoun. But, as Eugen Coseriu stated in his book "Introduction to the linguistics of texts" (German edition 1985), this does not correspond to the real use of this word.  While "he" in  "Ralf is tired. He will go to bed soon"  is a substitute, i.e. pro-noun, for "Ralf", "I" in  "Ralf is tired. I am going to bed"  is not.  The "I " here is understood as reference to a second person. T he same is true of  "du "  ( "you " ).  "Ich " and  "Du ",  these two words have a deictic function, they indicate somebody. Hence, we should not treat them as functional words or eliminate them as stopwords. Especially in literary texts, which have, according not only to Habermas (198...

Rammstein read by the machine (3): Liebe lieben

  As   we have seen , love ("liebe") is, once the stopwords are eliminated,  the most frequent feature in Rammstein texts. Among all the nouns indicating elementary states and matters, like "Wasser", "Sonne", "Licht" and "Lust", "Love" looks surprising. Usually, we do not consider love an elementary feeling. Rammstein, as far as it seems, do. But still, we have to be cautious, as we do not even know whether the feature"liebe" corresponds to a noun or to a verb.  With a case-sensitive context research we obtain "Liebe"   28 times  "liebe"   18 occurrences. In "was ich liebe" (2019): "ich liebe nicht, dass ich was liebe", in "OK" (2019): "ich liebe dich, wenn du mich lässt". In the same song, we hear "was sich liebt, das darf sich lecken". Various forms of the same verb, which are counted separately. We can check them, one by one, and get: 0 "li...