Edit distance between “Slovakia” and “Slovenia” in European languages [3722x3028] [OC]

Edit distance between “Slovakia” and “Slovenia” in European languages [3722x3028] [OC]

31 comments · 83% upvoted · source · other discussions

comments

the_gnarts [OP]

Description

The map shows the edit distance between the words for “Slovakia” and “Slovenia” in the main languages of Europe.

WAT?

One of the most popular tropes on r/MapPorn (and, sadly, on r/Europe as well) is how people fail to recall the difference between the countries of Slovakia and Slovenia because the names are too similar in their native language. Turns out that empirically they are indeed quite close for the majority of languages with a mean distance of 2.8 (median 3) separating them.

Interestingly, the names are as similar as it can get while still distinguishing meaning in Czech and Slovakian where it’s a matter of a single vowel -- e vs. i. No citizen of any of those two, however, would have any trouble differentiating between “Slovensko” and “Slovinsko”.

The difference was largest in Ukrainian despite it following the general rule of a Slovak- and a Sloven- stem: “Словаччина” (Slovaččyna) and “Словенія” (Slovenia). The different suffixes account for six steps of distance in this case.

Methodology

The input data was retrieved from Wikipedia’s interwiki links, starting from the English pages for Slovakia and Slovenia. Then, for each language the Levenshtein distance between the pair of names was calculated using the iterative version of the algorithm. This yielded values around three, ranging from one to six. These were mapped to color shades, not too saturated.

Looking for a suitable map template I arrived at a linguistic one which I chose because it’s rather coarse and, above all, available as vector graphics. Some detail had to be stripped nevertheless -- good bye Friulian, good bye Galician. After that, I amateurishly selected the respective shapes by hand to set the fill colors which was by far the most tedious step. Finally, title and legend were added.

Final remarks

I noticed I suck at drawing maps. I’d rather just take a shape file, assign colors to shapes programmatically, and have the map rendered by a competent GIS. From a couple searches it appears that I could leverage Grass GIS to that end. Impatient though as I am I gave up on studying its docs pretty quickly and reverted to my pedestrian approach.

I’d be happy for any tutorial links thrown at me!

PS: r/UnexpectedAxisPowers

ACuteMonkeysUncle

Turns out that empirically they are indeed quite close for the majority of languages with a mean distance of 2.8 (median 3) separating them.

2.8 of what separates them?

LaptopZombie

The distance is calculated by this algorithm (linked by OP in his long comment so you might have failed to notice it):

https://en.wikipedia.org/wiki/Levenshtein_distance

Informally, the Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other.

the_gnarts [OP]

2.8 of what separates them?

As u/LaptopZombie writes, it’s the Levenshtein distance, a common method to determine the number of modifications one has to carry out to arrive from one word at another. The algorithm used considers insertions of letters, deletions, and substitutions. Others include transpositions of adjacient letters and can yield shorter sequences.

Besides making ironic maps this has a number of practical applications. When programs reject invalid text input but offer a helpful suggestion of valid ones that were similar to what you typed, they use the edit distance as a metric for similarity because it is efficient to calculate. Edit distance is also used in genetics to measure the difference between base pair sequences.

ACuteMonkeysUncle

Thanks for clarifying that. It's more clear to me now.

[deleted]

0 separation: SlovakiaSlovenia
1 separation: Slovakia–Slovenia
2 separations: Slovakia––Slovenia
2.8 separations: Slovakia––-Slovenia

ACuteMonkeysUncle

It's so obvious now!

mrkopalj

Letters probably.

[deleted]

They're actually both etymologically the same word sorta.

Slovak + Slovene both come from Proto-Slavic slověninъ, plus -ia.

Also, interesting how Slovenian has quite high, while Slovak has very low.

the_gnarts [OP]

They're actually both etymologically the same word sorta.

Indeed. The similarity is not pulled out of thin air.

Also, interesting how Slovenian has quite high, while Slovak has very low.

As with Ukrainian, it’s the suffix: Slovaška vs Slovenija.

[deleted]

Is it pretty much all about the suffix? As I imagine the core part of the word is mostly the same in different languages.

the_gnarts [OP]
[deleted]

So is it solely based on spelling not pronunciation? If so, I reckon the main two factors in the difference will be suffix (probably linked to if the language has genders, and if they affect it), and how standard/logical the spelling is.

the_gnarts [OP]

So is it solely based on spelling not pronunciation?

Yes, of course. The metric doesn’t make sense with pronounciation but for some languages with a groomed phonetical alphabet (Slavic ones mostly) it can be a fair approximation.

offensive_noises

What about Switzerland vs. Sweden!

nahuelacevedopena

In Spanish they're quite similar – Suiza v Suecia

loulan

I never understood why people mixed those up. They have like two letters in common.

dan_bogdan

Because that's only their English names. And it isn't only about spelling, pronunciation plays a bigger role.

loulan

It's English speaking people who tend to mix those up though. In my native language (French) it would be impossible for instance.

the_gnarts [OP]

In my native language (French) it would be impossible for instance.

A lot of it would depend on what subset of geographical facts you (or the majority of people around you) have been primed with. In France or even Canada, sure, Sweden and Switzerland are well known entities and it’d be hard to find a native who can’t tell them apart.

For native French speakers of Africa, though, it would be a different matter. I consider myself a fan of maps and all things geographical in general and have been for as long as I can remember. However, when it comes to determining some African countries I’d have to think twice too. Congo, Republic or Democratic Republic? Is that slice to the West Benin or Togo? You get the idea. The same would be the case, I imagine, for people from the Congos, Benin or Togo -- all of which have French as the official language -- with respect to at least some European countries.

loulan

That's not what I meant. I meant that the two words sound very different in French.

pepperboon

"Swiss" and "Swede" are a bit more similar than the country names.

the_gnarts [OP]

Switzerland vs. Sweden!

Short answer: the mean distance is 4.8 … I’ll post a new new map if I get around to making it.

the_gnarts [OP]

Ok, here you go.

Priamosish

Thank you for including Luxembourgish as a language! <3

the_gnarts [OP]

Well I did include Romansh, Sorbian and Tatar as well so you’re in best company :)

envatted_love

What's going on in Belarus?

the_gnarts [OP]

The pattern? It’s Russian speakers vs. Belarusian. [0] For this map they don’t differ though so they got assigned the same color. The contours of the language boundary are still visible.

[0] The original shape file overemphasizes minority languages and almost extinct old dialects IMO, so this may be the case with Belarusian well.

envatted_love

Thanks.

openseadragonizer

Zoomable version of the image

 


I'm a bot, please report any issue on GitHub.