/ Duolingo

Duolingo Skill Strength

Update: This script is now updated to also support Duolingo's new website (which only some users have so far)

After finishing my first tree on Duolingo, I was interested in how Duolingo keeps track of skill strength. I started digging into the API and made some interesting discoveries.

Word Strength

The whole frontend of the Duolingo website turns out to be a backbone.js application. That means most, if not all data is fetched from the server via API requests. One such request happens on the "Words" tab (given that the language you are learning does have that activated). The response contains a list of all learned words including their attributes. A definition looks like the following:

{
      "strength_bars": 1,
      "infinitive": null,
      "normalized_string": "sesiones",
      "pos": "Noun",
      "last_practiced_ms": 1421601346000,
      "skill": "Abstract Objects 2",
      "related_lexemes": [
        "a99dda404917a15e3accffe9e6883860"
      ],
      "last_practiced": "2015-01-18T17:15:46Z",
      "strength": 0.058932,
      "skill_url_title": "Abstract-Objects-2",
      "gender": "Feminine",
      "id": "df4fbbf175a1b72617f4107a766cb8a7",
      "lexeme_id": "df4fbbf175a1b72617f4107a766cb8a7",
      "word_string": "sesiones"
}

Note that the word here is sesiones, is a feminine noun, was last practiced on January 18th, 2015, belongs to the skill Abstract Objects 2 and has a strength of 0.058932. It is clear that internally all words have an assigned floating point strength that increases when you use that word and slowly decreases over time.

In total, for Spanish, there are 2681 words. This number is different from what is shown on the "Words" tab. I haven't yet figured out where this difference comes from. Plurals and feminine/masculine words all appear in the official list. The API returns a lot more words for each skill than is shown on the individual skill pages.

Skill Strength

Now that we have a list of all words and the skills they belong to we can calculate the skill strength based on the average strength of each word in that skill. Note that Duolingo may calculate the strength based on different factors (I suspect that they use the median or just a subset of words instead of the mean).

Oftentimes people complain that Strengthen Weak Skills does not work as they expect it to work. Knowing that each word has its individual strength value and that skill strength is based on that means that Strengthen Weak Skills does not target weak skills specifically, it does target weak words. Those words are not necessarily from the same skill and therefore do not always improve the individual skill strength (in fact they do, just not noticeable in the 5 level strength shown on the website).

Userscripts

Chrome and other browsers allow extensions to insert scripts into a website. Various extensions exist for

For Duolingo the community has already created a number of userscripts that enhance the experience for users. I used the data from the API to create a new userscript that shows you the strength of each skill in percent, the overall (average) strength of all words and the number of words that have a strength of 0.

Skill Strength Userscript Screenshot

Installing

  1. If haven't already, install the appropriate extension for your browser (restarting your browser afterwards if necessary):
  1. Click here to install the userscript.
  2. Confirm the installation when prompted.

Summary

The Duolingo API has some hidden data that can be used to create nice statistics and improve the user experience. I really enjoy digging through all the data and learn how Duolingo works behind the scenes. Sadly there is no documented API available and there seems to be no plan of introducing one in the future. The possibilies for developers to enhance the experience of language learning with Duolingo would be sheer endless.

The userscript shown here can help you target weak skills keep your tree golden.