The Virtual Dutch Flashcards in R.

A Shiny application supporting words and verbs declination memorization.

Jacek Pardyak

2019-03-28

Introduction

When I started learning Dutch, I couldn’t find an R-project to support my vocabulary memorization. So I started it myself.

What’s absurd, my goal is that I won’t need them in the near future.

Maybe someone else vindt het leuk or is willing participate in development.

The data

There are two data sets:

  1. List of Dutch words with English translation,

Vocabulary loosely covers material from this Handbook1 De opmaat, Naar NT2-niveau A2, Maud Beersmans, Wim Tersteeg and is stored in JSON files. The list is continuously expanded with words and expressions that I find interesting.

Source: www.nt2.nl Source: www.nt2.nl

  1. List of irregular Dutch verbs with conjugated forms.

The list is a compilation of above mentioned handbook and this book2 Niderlandzki, Gramatyka z ćwiczeniami, Katarzyna Wiercińska

Source: www.jezykiobce.pl Source: www.jezykiobce.pl

I have chosen JSON file format in favour of CSV because one word can have more then one translation (or conjugated form) or can appear in several Themas with a different meaning. List data structure is very natural to store that kind of data.

The first dataset is a data frame with lists, the second is data frame of nested data frames.

The structure of woordenlijst.json is as follows:

## [
##   {
##     "TH": [0],
##     "NL": ["eekhoorn"],
##     "EN": ["squirrel"],
##     "PL": ["wiewiórka"],
##     "ST": "FALSE",
##     "AD": "",
##     "EX": ""
##   },
##   {
##     "TH": [0],
##     "NL": ["hoeven"],
##     "EN": ["to need"],
##     "PL": [""],
##     "ST": "FALSE",
##     "AD": "",
##     "EX": "Godzijdank hoef ik geen Pools te leren."
##   },
##   {
##     "TH": [0],
##     "NL": ["upload"],
##     "EN": ["to upload"],
##     "PL": [""],
##     "ST": "TRUE",
##     "AD": "",
##     "EX": "Ik heb de foto op Facebook geüpload."
##   }
## ]

And the structure of woordenlijst.json is as follows:

## [
##   {
##     "INF": "bakken",
##     "OTT": {
##       "SIN": {
##         "PE1": ["bak"],
##         "PE2": ["bakt"],
##         "PE3": "bakt"
##       },
##       "PLU": {
##         "PE1": "bakken",
##         "PE2": "bakken",
##         "PE3": "bakken"
##       },
##       "EXA": ""
##     },
##     "OVT": {
##       "SIN": {
##         "PE1": ["bakte"],
##         "PE2": ["bakte"],
##         "PE3": ["bakte"]
##       },
##       "PLU": {
##         "PE1": ["bakten"],
##         "PE2": ["bakten"],
##         "PE3": ["bakten"]
##       },
##       "EXA": ""
##     },
##     "VTT": {
##       "SIN": {
##         "PE1": ["heb gebakken"],
##         "PE2": ["hebt gebakken"],
##         "PE3": ["heeft gebakken"]
##       },
##       "PLU": {
##         "PE1": ["hebben gebakken"],
##         "PE2": ["hebben gebakken"],
##         "PE3": ["hebben gebakken"]
##       },
##       "EXA": ["Heb je het taart gebakken?"]
##     }
##   }
## ]

The script

Script of my Shiny application is stored in two files available from this Repository3 https://github.com/JacekPardyak/FC/:

  1. ui.R

  2. server.R

This is the header of ui.R file:

##  [1] "library(shiny)"                                                             
##  [2] "library(shinydashboard)"                                                    
##  [3] "library(jsonlite)"                                                          
##  [4] "library(DT)"                                                                
##  [5] "sidebar <- dashboardSidebar(sidebarMenu("                                   
##  [6] "  menuItem(\"Woorden\", tabName = \"woorden\", icon = icon(\"dashboard\")),"
##  [7] "  menuItem(\"Werkwoorden\", tabName = \"werkwoorden\", icon = icon(\"th\"))"
##  [8] "))"                                                                         
##  [9] ""                                                                           
## [10] "body <- dashboardBody(tabItems("

And the header of server.R file:

##  [1] "words <- fromJSON(txt = \"./data/woordenlijst.json\")"                          
##  [2] "verbs <- fromJSON(txt = \"./data/werkwoorden.json\")"                           
##  [3] ""                                                                               
##  [4] "function(input, output, session) { "                                            
##  [5] "  # INF - infinitief: werken, lezen"                                            
##  [6] "  # OTT - onvoltooid tegenwoordige tijd: ik werk, ik lees"                      
##  [7] "  # OVT - onvoltooid verleden tijd: ik werkte, ik las"                          
##  [8] "  # VTT - voltooid tegenwoordige tijd: ik heb gewerkt, ik heb gelezen"          
##  [9] "  #voltooid verleden tijd (vvt): ik had gewerkt, ik had gelezen"                
## [10] "  #onvoltooid tegenwoordige toekomende tijd (ottt): ik zal werken, ik zal lezen"

Shortly about the R libraries:

The application

As of 2019-03-28 my application supports:

  1. Memorization of the Dutch words,

  1. Learning forms of irregular Dutch verbs.

The usage is straightforward.

Further work

Further I can: