Skip to content

A minimal browser extension for removing the typo warnings related to diacritics on Duolingo, and fixing dictionary searches.

License

Notifications You must be signed in to change notification settings

blmage/duolingo-unicode-normalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duolingo Unicode Normalizer

Chrome Web Store Mozilla Add-on

A minimal browser extension for removing the typo warnings related to diacritics on Duolingo, and fixing the dictionary searches containing decomposed characters.

Download

Description

The problem(s)

Typos are detected in seemingly perfectly valid answers:

you_have_a_typo

Searches for existing words (with accented characters) do not return any result:

no_word_found

The cause

Duolingo expects answers and dictionary searches to be NFC-normalized strings (see the Unicode Normalization FAQ).

But, depending on the input method, those values may contain decomposed characters, making them internally different from their normalized versions.

For example, the Vietnamese word một (one) can be written in (at least) 3 different ways:

Version Value Escaped value
NFC một m \u1ED9 t
VN keyboard một m \u00F4 \u0323 t
NFD một mo \u0323 \u0302 t

The solution

Normalize the relevant values before they are handled.

The extension lets you choose in the options screen whether to normalize values after each key stroke, or after a more meaningful change. Both options have their pros and cons:

options_popup

The result

you_are_correct

translations_found

What if I still encounter some weird typos, or if my search does not work?

Don't hesitate to post an issue, including as much details as possible, so that I can try to reproduce it!