softwareByAndi / vocab-practice-chrome-extension

practice foreign language vocabulary during daily web browsing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vocab_practice

practice vocab during daily casual web browsing

Screenshot 2022-11-12 at 5 01 05 PM

tutorial recording

https://www.loom.com/share/3d1338a9f2aa40fa94520d56859265d6

description

  • This is a chrome extension that alters web pages to practice foreign language vocabulary by replacing any vocab you know with its associated foreign word.
  • to support other languages, change the language codes in the translate.js file.
  • Vocab are colored according to how often you see them:
    • (from new -> mastered) = (red, orange, purple, dark-blue, light-blue, gray, black)

translating sentences & nested json structure

  • this extension utilizes Google Translate, but you can also input vocab manually. This was important because machine translation algorithms don't consistently translate with correct grammar, so the few incorrect translations can easily be manually adjusted by saving a new translation.
  • Translations are then stored and maintained in your chrome local storage.
  • Note that to use google translate, you need to update translate.js with your google translate api key
  • I opted to store direct translations for specific sentences using a nested-structured json file, which optimizes translations of full sentences (with almost no overhead), and always ensures that the longest known translation is found
    • (i.e. the input I have should produce the output Tengo not Yo Tener

translating conjugations

  • the last thing you or I want to do is manually input translations for every conjugation of a verb. So congrats! I've automated that for you. (only for English)
  • But the original code created over 524 combinations. So I pruned that down to 109 commonly used conjugations.
  • There are options to translate past present or future tense (note that your input should also be in past present or future tense in your native language)
    nouns -> 5 conjugations
    verb present tense -> 30 conjugations
    verb past tense -> 8 conjugations
    "to be" tense / future tense -> 66 conjugations

screen shots

Screenshot 2022-11-12 at 5 01 05 PM

recomendations

recomendations

verb

verb

noun

noun

to be

to be

past

past

About

practice foreign language vocabulary during daily web browsing

License:MIT License


Languages

Language:JavaScript 86.3%Language:CSS 13.7%