Features:

  • Support scraping the courses in MEM to take the vocabulary
  • Translate the words to your own language
  • Get the IPA for the English course

Installation

Window

python -m pip install memrise

Linux

pip install memrise

macOS

sudo pip3 install memrise

Appplication Requires

Install DB Browser : SQLite

Install Library:

pip install googletrans==4.0.0rc1

Guidelines

How to take Course ID?

Access the Memrise Website and copy the Course ID as the following picture

Import library and initialize database

from memrise import Course, Data
#Create file database output
db = Data('English.db') # Or *.sqlite easy to open
#Connect to file database and init
db.init_database()

Scraping course with ID

The following example is scraping the English course for the French

# Connect the course to scraping info this maybe take a few momment.
course = Course(2157577)
# Update information about the course
db.update_course(course)

Update the IPA in database

Use the method update_ipa() if the Language Course is English for update the IPA information auto.
The parameter language default is br

  • br : English UK
  • am : English US

# Update IPA for database with default `br`
db.update_ipa()
# Use the follow if English US
# db.update_ipa('am')

Translate the vocaburaly to your own language

Use the method update_trans(language)

The parameter language follow the ISO 639-1 codes as the bottom

# Translate to Vietnamese
db.update_trans('vi')

Show the output with SQLite Browser Application

Open the SQLite Browser Application and follow the steps below

Feel free to make your own course with the SQL query

Steps : Execute SQL > Typing SQL Statements > Run

SELECT word, sub, IPA FROM words ; 

Languages ISO369-1 Code

af : afrikaans                 fy : frisian                   ky : kyrgyz                sr : serbian
sq : albanian                  gl : galician                  lo : lao                   st : sesotho
am : amharic                   ka : georgian                  la : latin                 sn : shona
ar : arabic                    de : german                    lv : latvian               sd : sindhi
hy : armenian                  el : greek                     lt : lithuanian            si : sinhala
az : azerbaijani               gu : gujarati                  lb : luxembourgish         sk : slovak
eu : basque                    ht : haitian creole            mk : macedonian            sl : slovenian
be : belarusian                ha : hausa                     mg : malagasy              so : somali
bn : bengali                   haw : hawaiian                 ms : malay                 es : spanish
bs : bosnian                   iw : hebrew                    ml : malayalam             su : sundanese
bg : bulgarian                 he : hebrew                    mt : maltese               sw : swahili
ca : catalan                   hi : hindi                     mi : maori                 sv : swedish
ceb : cebuano                  hmn : hmong                    mr : marathi               tg : tajik
ny : chichewa                  hu : hungarian                 mn : mongolian             ta : tamil
zh-cn : chinese (simplified)   is : icelandic                 my : myanmar (burmese)     te : telugu
zh-tw : chinese (traditional)  ig : igbo                      ne : nepali                th : thai
co : corsican                  id : indonesian                no : norwegian             tr : turkish
hr : croatian                  ga : irish                     or : odia                  uk : ukrainian
cs : czech                     it : italian                   ps : pashto                ur : urdu
da : danish                    ja : japanese                  fa : persian               ug : uyghur
nl : dutch                     jw : javanese                  pl : polish                uz : uzbek
en : english                   kn : kannada                   pt : portuguese            vi : vietnamese
eo : esperanto                 kk : kazakh                    pa : punjabi               cy : welsh
et : estonian                  km : khmer                     ro : romanian              xh : xhosa
tl : filipino                  ko : korean                    ru : russian               yi : yiddish
fi : finnish                   ku : kurdish (kurmanji)        sm : samoan                yo : yoruba
fr : french                    gd : scots gaelic              zu : zulu       

Log changes:

v1.0.0: Implementation Scrapping Vocabulary
v1.1.0: Update IPA Function
v1.2.1 : Release check for fixing ERROR IPA and update new TRANSLATE FUNCTION

GitHub

View Github