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.
There are two data sets:
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
The list is a compilation of above mentioned handbook and this book2 Niderlandzki, Gramatyka z ćwiczeniami, Katarzyna Wiercińska
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?"]
## }
## }
## ]
Script of my Shiny application is stored in two files available from this Repository3 https://github.com/JacekPardyak/FC/:
ui.R
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:
shiny4 https://shiny.rstudio.com/ is a general framework for building web applications,
shinydashboard5 https://rstudio.github.io/shinydashboard/ turns Shiny applications into cool dashboards,
jsonlite6 https://cran.r-project.org/web/packages/jsonlite/ is used to process JSON files,
dt7 https://rstudio.github.io/DT/ is used to edit table directly in the dashboard.
As of 2019-03-28 my application supports:
The usage is straightforward.
Further I can:
apply Leitner System8 https://en.wikipedia.org/wiki/Leitner_system,
add more languages (Polish or Russian),
expand the list with words and expressions I want to learn,
add material I want to learn in the next level of my journey with Dutch language.