Fun Stuff: Reproducing Language Weirdness Index Projects with WALS

4 minute read

Published:

Motivations For Recreating The Weirdness Index

When I was in sixth grade, I decided I would get really into linguistics. It was partially on a whim. I had a lot of grand delusions at the time, like my greatest dream of being the fastest Wikipedia speedrunner on Earth – I would train for it every day, picking random articles and timing myself drawing a path through them. I got pretty decent at clicking, but really, what I was training myself for was finding patterns. Around this time, I had also decided that middle school was clearly insufficient for my new quest to become a world-renowned linguist, so I turned to my local library and decided to read every single book in the 410 range: Linguistics in the Dewey Decimal System. It was my first foray into the adult section, and I was determined to read all of them. I would soon realize this was a ridiculous task, considering I had naively ignored one important fact: the section would keep growing as more books were being written. 

One of these books was Babel: Around the World in 20 Languages by Gaston Dorren, a book I credit with my interest in comparative linguistics even now. Dorren, when discussing the Germanic languages, brings up American linguist Tyler Schnoebelen’s blog post about the “Weirdness Index,” his analysis of World Atlas of Language Structures (WALS) data in an attempt to discover which languages are statistically unique compared to the norm. The blog post, originally hosted on the shuttered NLP startup Idibon’s website, can be found here.

Around this time, I had switched paths — no more linguistics for me, nope, my new goal was to understand every single paper Alan Turing had ever written by way of computer science and artificial intelligence. NLP was still on my mind, though, and my interest in linguistics has remained at the back of my mind. Could I replicate the weirdness index results with my own data analysis? If a weirdness index is possible, then surely there would be a way to visualize that information, too. These questions are what inspired me to take on this passion project.

Statistical Approach

I took the WALS data and processed it according to what I thought would be the best way to approach the problem. This is more of an experiment; most of these are not “statistically correct” ways of doing data analysis, as it’s more of a thought experiment than anything else. 

For each feature, I calculated a “rarity score”, which can be simplified into:

rarity = 1 - (frequency of value/total non-missing values)

These rarity scores were developed for each value of each non-missing feature, where 0 is the most common and 1 is the most rare. There are issues, of course, with this approach, which we’ll deal with a little later. The first issue is that many of the WALS features are missing for most languages — there are tons of languages with just a few features filled out, and that affects these rarity scores. For example, if there are only 2 languages with values for a certain feature X, then those values would be considered representative of all languages on Earth, despite that not necessarily being the case.

Data Visualization

I wanted to visualize this data in a way that made sense. I grabbed the latitude and longitude for the values for each value, which are historically agreed-upon values by linguistics researchers. I mapped these out as points on a world map, and sorted them by quartiles according to weirdness. I also wanted to make a way to filter languages according to how confident the model would be on their weirdness index, which meant languages with more features mapped by WALS rather than less features, so I created a scale that would filter the map according to these values. You can test it out at: https://saloneeverma.github.io/language-weirdness/