<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/inventing-new-words-tribute-to-umberto-eco-2/"></div></div><div><a data-url="http://www.r-bloggers.com/inventing-new-words-tribute-to-umberto-eco-2/" data-counturl="http://www.r-bloggers.com/inventing-new-words-tribute-to-umberto-eco-2/" data-count="horizontal" data-text="Inventing new words. Tribute to Umberto Eco" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.milanor.net/blog/inventing-new-words-tribute-umberto-eco/"> MilanoR</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<div>
<p><span><em>Salvino A. Salvaggio, PhD<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn1"><sup>1</sup></a>  <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn2"><sup>2</sup></a>  <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn3"><sup>3</sup></a></em></span> • <span><em>15 March 2016</em></span></p>
<p>[Code and data used in the article can be downloaded here: <a target="_blank" rel="" href="http://www.milanor.net/blog/wp-content/uploads/2016/05/InventingWords.zip">InventingWords</a>]</p>
</div>
<p>In the mid-1980s, while I was a first-year student in physics at the Bologna State University (Italy), a few friends of mine dragged me to the School of Drama, Arts and Music Studies (DAMS) to follow a couple of lessons of Umberto Eco. I still remember how happy and impressed I was. Actually, I didn’t limit myself to listen to him but I literally drank his words, fascinated by him, his style, his erudition, his rigor at the same time austere and brilliant. A couple of years later, during my Belgian university course in quantitative social sciences, I had the opportunity to enthusiastically study Eco’s academic contributions for my exams of linguistics, semiotics, social sciences and philosophy. Well before the novelist Umberto Eco, I liked, and still like, the investigator, meticulous to the mind-boggling, but always ready to expand the domain of his thinking well outside and ahead the limits of academic knowledge, in popular culture, in search of meaning. His ability to play with words, or use them either as tools or historical markers, was astonishing. As I still feel the emotion following his death, I would like to propose, as a kind of tribute and language game, <em>a method for inventing words</em> —actually, it is more an algorithm than a method. And this will be focused on the Italian language, which was Eco’s mother tongue (and my second mother tongue as well).</p>
<hr>
<p>The easiest and most immediate way to invent a new word is to sample letters randomly. Proceeding that way to create words of, say, 7 letters, I got: nevltur, capbowqa, grnsohy, tfgzuoq, birymdo<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn4"><sup>4</sup></a>. Nothing wrong with that, but the least one could say is that these words hardly “sound” Italian. How can I assert it? Perhaps because some sounds in these words are so rare in Italian (if not absolutely inexistent) that they do not sound familiar to an Italian ear by any mean. Something in the back of our minds tells us that consonant clusters such <em>nvl</em>, <em>cpbq</em>, <em>grns</em>, <em>tfgz</em> or <em>zuoq</em> or <em>rymdo</em> are not spontaneous in Italian —as a matter of fact, they don’t exist in any Italian word. So, the words we use in each language are not a product of chance but belong to rules which in turn they also contribute to set.</p>
<p>Therefore, if we want to invent new words that <em>sound</em> like Italian words we must first identify the rules of formation of phonemes in Italian (or any other language). And a statistical approach can here be of great help.</p>
<p>First of all, I built an Italian dictionary containing about 323,000 words collected from existing dictionaries and a few hundred free eBooks in Italian (novels, essays, etc.).<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn5"><sup>5</sup></a> Analysing the composition of the words in a statistical manner, it appears quite clearly that each letter has a specific probability of being followed by another letter. As well as each letter has a certain probability of being the first or the last letter of a word.</p>
<p>For example, let’s look at the letter <strong>p</strong>.</p>
<p><a target="_blank" rel="attachment wp-att-2298" href="http://i0.wp.com/www.milanor.net/blog/wp-content/uploads/2016/05/lettera_p-1.png"><img sizes="(max-width: 701px) 100vw, 701px" srcset="http://www.milanor.net/blog/wp-content/uploads/2016/05/lettera_p-1-300x133.png 300w, http://www.milanor.net/blog/wp-content/uploads/2016/05/lettera_p-1-768x341.png 768w, http://i0.wp.com/www.milanor.net/blog/wp-content/uploads/2016/05/lettera_p-1.png?resize=456%2C203 864w" alt="lettera_p-1" class="wp-image-2298" src="http://i0.wp.com/www.milanor.net/blog/wp-content/uploads/2016/05/lettera_p-1.png?resize=456%2C203" data-recalc-dims="1"></a></p>
<p> </p>
<p>In Italian, the probability that the letter <strong>p</strong> is followed by the letter <strong>a</strong> is of about 18%, about 14.5% by <strong>r</strong> or <strong>e</strong> and so on up to 0.2% probability of being followed by <strong>n</strong> (as in the word <em>apnea</em>), or 0.01% of being followed by <strong>z</strong> (for example, in <em>opzione</em>), and it is never followed by <strong>g</strong> or <strong>b</strong>. Perhaps this is the very reason why intuitively a word created by complete random sampling like the previous <strong>capbowqa</strong> doesn’t seem Italian at all.</p>
<p>So, if we say that a letter is a statistical event, the sequence of events in a word follows a probability chain similar to what statisticians call a <strong>Markov chain</strong>.<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn6"><sup>6</sup></a></p>
<p>Applying the same rationale to all the letters of the alphabet (including characters with accents) we can build a matrix, which will be specific to each language and details the probabilities of transition from any letter to any other in the following position. For the Italian language, the transition matrix looks like the chart below, and it reads like this: you choose a letter on the vertical axis, the corresponding color on the horizontal axis gives an indication of the probability that the vertical-axis letter is followed by the horizontal-axis letters. The grey color indicates a probability equal to zero (i.e. the combination of letters doesn’t exist in Italian), light blue indicates a very low probability up to dark red to reflect a high probability of transition. Those who wonder in which Italian words the letter <strong>é</strong> precedes the letters <strong>b</strong> or <strong>e</strong> … well, these are words of French origin commonly used in Italian, such as <em>tournée</em> or <em>débacle</em>.</p>
<p><a target="_blank" rel="attachment wp-att-2299" href="http://i2.wp.com/www.milanor.net/blog/wp-content/uploads/2016/05/transitionMatrix_plot-1.png"><img sizes="(max-width: 555px) 100vw, 555px" srcset="http://www.milanor.net/blog/wp-content/uploads/2016/05/transitionMatrix_plot-1-150x150.png 150w, http://www.milanor.net/blog/wp-content/uploads/2016/05/transitionMatrix_plot-1-300x300.png 300w, http://i2.wp.com/www.milanor.net/blog/wp-content/uploads/2016/05/transitionMatrix_plot-1.png?resize=456%2C456 672w" alt="transitionMatrix_plot-1" class="wp-image-2299" src="http://i2.wp.com/www.milanor.net/blog/wp-content/uploads/2016/05/transitionMatrix_plot-1.png?resize=456%2C456" data-recalc-dims="1"></a></p>
<p> </p>
<p>We therefore see in Italian that the letter <strong>q</strong> is almost always followed by <strong>u</strong>, rarely it can be followed by another <strong>q</strong> (<em>soqquadro</em>, <em>soqquadrare</em>) or by nothing (the last letter of the word as in the case of <em>Iraq</em>). The <em>ù</em> and <em>à</em> appear both followed only by nothing, so always ending a word and never appearing in the middle of a word. Predominantly vowels follow <strong>v</strong>. On the contrary, the letter <strong>a</strong> accepts almost any other letter in his vicinity, except accented vowels.</p>
<p>At this point, it just takes feeding an algorithm with this matrix of transition probabilities from one letter to another to generate new words that will sound like Italian beyond their total absence of any meaning. I now can close this brief article with a personal touch, half way serious and facetious, inventing a story made of many invented words that would sound like Italian to Italian ears. Kind of… ear candies for Italian language lovers.</p>
<p>Ieri, passeggiando lungo la riva del <em>flumattico</em>, ho visto sul ramo di un <em>fregirio</em> solitario un <em>sidri</em> occupato a <em>cinotolare</em> il suo <em>zantaro</em> che <em>roromava</em> di piacere. Ma il <em>gotriolo</em> che feci avvicinandomi lo <em>spinesò</em> e scappò via, rapido e <em>iasto</em>, verso la cima <em>pravata</em> della collina. Scomparve presto dalla mia vista e mi rimase solo il <em>faniaco</em> di un <em>untiolo</em> raro nonché anche il <em>dolinori</em> al pensiero che questo <em>ospruto gollitello</em> fosse diventato così <em>cutro</em> nelle nostre <em>senioli</em> campagne<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fn7"><sup>7anal</sup></a></p>
<div>
<hr>
<ol>
<li>This document is the result of an analysis conducted by the author and exclusively reflects the author’s positions. Therefore, this document does not involve in any way, either directly or indirectly, any of the employers, past and present, of the author. <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref1">↩</a></li>
<li>eMail: salvino [dot] salvaggio [at] gmail [dot] com ; WebSite: <a target="_blank" href="http://www.salvaggio.net/">http://www.salvaggio.net/</a>  <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref2">↩</a></li>
<li>This work was inspired by the blog of David Louapre, Science Etonnante – <a target="_blank" href="http://is.gd/zVTGEH">http://is.gd/zVTGEH</a>  <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref3">↩</a></li>
<li>In R: paste(sample(letters, 7, replace=T), collapse=’’)  <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref4">↩</a></li>
<li>Novels and essays sometimes contain words in other languages, but in a so small proportion that it doesn’t really impacts the overall figures. Anyway, I kinda manually cleaned the dictionary canceling foreign words that I saw flicking through it.<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref5">↩</a></li>
<li>To be precise and accurate, the Markov property states that the future event depends <em>only</em> on the current state of the system and not on the previous states. In linguistics this is not entirely true since the probability of finding a letter in a certain position in the word doesn’t only depend on the previous letter, but also, although to a lesser extent, on the foregoing others —that is why a consonant which is doubled is never tripled. More on Markov Chain in <em>R</em>: <a target="_blank" href="http://is.gd/nyoFXN">http://is.gd/nyoFXN</a>  <a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref6">↩</a></li>
<li>For the sake of transparency, it should be noted that with this basic version of the algorithm I had to generate hundreds of words to have a sufficient choice to be able to select those that seem <em>more</em> Italian.<a target="_blank" href="file:/home/mch/Documents/Quantide/MilanoR/Articles/salvino_salavaggio_inventare-parole/Articolo/Articolo/CostruireParole%20_ENG_v1/CostruireParole__ENG_v1.html#fnref7">↩</a></li>
</ol>
</div>
</div>
<p>The post <a target="_blank" rel="nofollow" href="http://www.milanor.net/blog/inventing-new-words-tribute-umberto-eco/">Inventing new words. Tribute to Umberto Eco</a> appeared first on <a target="_blank" rel="nofollow" href="http://www.milanor.net/blog">MilanoR</a>.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/inventing-new-words-tribute-to-umberto-eco-2/"></div></div><div><a data-url="http://www.r-bloggers.com/inventing-new-words-tribute-to-umberto-eco-2/" data-counturl="http://www.r-bloggers.com/inventing-new-words-tribute-to-umberto-eco-2/" data-count="vertical" data-text="Inventing new words. Tribute to Umberto Eco" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.milanor.net/blog/inventing-new-words-tribute-umberto-eco/"> MilanoR</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/uL_GZlDr30M"></a></div>