You are not logged in.

#1 2016-06-04 14:21:41

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

vgme - a immature program for learning vocabulary damn quickly.

Hello,

(latest update 17.07.2016)

preface

my name is Michael and I am a 29-years-old teacher for chemistry and maths. I am from Germany and English is a foreign language for me so I want to apologise for all my writing mistakes which I'll probably do frequently. 

I am also not a very good programmer. Actually, I can only cobble together some scripts I need for my daily life. Therefore I have written the whole programme I am presenting now as a bash script - a horribly coded bash script to be completely honest and some experienced programmers might be shocked if they look in my coding. So why I am presenting the programme at all? Because I think however worse it's coded it's a damn useful programme which helped me a lot to improve my English pronunciation and I learned easily 50 new words a day with it. I thought always that I have to learn a "right" programming language, code it better and present a perfect programme for the community one day but then I figured out that I'll never be able to reach that aim alone. 

I know it's not the first programme of that kind but no other could satisfy my claims. So it might be a worse written programme but in my opinion it's a very good designed programme concerning the way how one can use it. I want to thank all the people making free software useable for everyone and I want to give a small piece back. The programme is still useable for everyone who wants to use it and I want to ask in addition for help. I'd be happy if some experienced coders would help me to write the programme "well" and I have a thousand ideas how to make learning even more efficiently.

What does the programme do?

The programme helps to learn vocabulary with the principle of flashcards and is useable for theoretically each language. It doesn't need a GUI and it has some functions for sorting the words which are to be learned (which is extraordinary helpful if someone hadn't the time to repeat words for a long term). It also can be used like a dictionary for the command line. It organises words in units. The "directions" "language aa to language BB" and "language BB to language aa" will be asked independently.

The operator "L" (learn) is used to learn new words and to repeat old words, that's the core functionality of the programme:
learn_01thumb.pnglearn_02thumb.png

>>> vgme -Lh
operator:        -L (LEARN)  [combinable with -O]                     
                 asks for due, activated words of given          
                 units which fulfil a restriction and          
                 activates an arbitrary number of new words.   
                                                                       
usage:           vgme [-O<option(s)>] -L[restriction] [place(s)[:?]]
                                                                       
restriction:                                                           
  (none)         asks for words of any level               
  "<=?"          aks for words with level less or equal ?      
  ">=?"          aks for words with level greater or equal ?         
  "==?"          aks for words with level equal ?                 
  "==a-b"        aks for words with level between a and b            
  "==a,b,c,..."  aks for words with level a, b, c, ...                
                                                                       
place(s):                                                            
  (none)         aks for words of any unit                       
  [:?] or [?]    " " and activates  ? random new words in   
                 activated units                                 
  [unit]         aks for words of unit [unit]                    
  [unit:?]       " " and activates ? random new words of this unit 
  [aaBB]         asks words of the tuple [aaBB]               
  [aaBB:?]       " " and activates ? random new words    
                 in activated units of type aaBB        
                                                                       
example:         vgme -L"<=12" frEN:5 enDE enDE_01:3                   
                                                                       
Without usage of operator -O the words will be          
asked randomly (equals -Ors0).  

The operator "F" (find) is used to search for words saved in the units (more about that later):
find_01thumb.png


... I could write many pages and I am already getting tired. Let me know if you have a general interest in this programme and I'll show more functions and upload it in the AUR.

How to get started?
Download the package (see top)

* create a .txt file with name aaBB_01.txt (aa=language abbreviation for to new language - two(!) small(!) letters, BB=language abbreviation for the known language - two(!) capital(!) letters, behind the underscore 01 for unit 1, 02 if you create a new unit and so on)
* the .txt must have two columns separated by tab: write the words of aa in the left column, separate them with , or ; separate irregular forms with | and write comments in brackets at the end of the column. Same for the right column with language BB
* You can download a test-file with 4600 words here.

>>> cat enDE_01.txt
to bear|bore|borne	gebären; ertragen, aushalten (unregelmäßig)
zipper (AE)	Reißverschluss (AE)
vivacious (having a lively, attractive personality)	temperamentvoll, lebhaft, aufgeweckt
about (not etwa, circa)	über (in Bezug auf)
about (not über)	etwa, circa
old|elder|eldest	älter (für Geschwister)
to be sitting ducks (idiom)	auf dem Präsentierteller sitzen
trousers (sg + pl)	Hose, Hosen
to underestimate sb./sth.	jdn./etw. unterschätzen
to throb with pain	vor Schmerzen pochen, vor Schmerzen klopfen
the (ðə / ði vor Wörtern deren AUSSPRACHE mit einem Konsonant / Vokal beginnt.)	der, die, das

* install the file using the operator E

vgme -Ei /path/to/the/file/aaBB_01.txt

caution: typing the same command again will overwrite the existing unit including your learning progress. Chose another name e.g. aaBB_02.txt to create a new unit or add words (-Ea) to the existing unit. 
* (optional) create the directory ~/.vgme/audio/xx (replace xx with the language abbreviation of the language). Example ~/.vgme/audio/en and save .mp3-files in it, e.g. "old.mp3" "elder.mp3", "to_do.mp3". Those .mp3-files will be played when the word is asked. You can create a dictionary for each language and store the audio-files in it.  Needs mplayer!
* activate at least one word to get started with learning:

vgme -L aaBB_01:1

* use simply "vgme" without any option to learn all due words in all units. The programme will give no output if no word is due.

The operator "E" (edit) is used to install or delete units or words.

>>> vgme -Eh
operator:        -E (EDIT)                                              
                 installs and deletes words or units.                   
                                                                        
usage:           vgme -Ei <.txt-file(s)>                                
  or             vgme -Ea <unit> <.txt-file(s)>                         
  or             vgme -Ea <unit> <<[<] <here-document/string>           
  or             vgme -Ed <unit(s)>                                     
  or             vgme -Ed <unit> <.txt-file(s)>                         
  or             vgme -Ed <unit> <<[<] <here-document/string>           
  or             vgme -Em <unit> <reference>                            
                                                                        
Optionen:                                                               
  -i  (install)  installs/overwrites unit(s) out of a file(s)           
  -a  (add)      adds words of .txt-file(s) or here-documents           
                 into the unit <unit>                                   
  -u  (use)      adds words of .txt-file(s) or here-documents           
                 into the uni  <unit> and activates them                
  -d  (delete)   deletes words in .txt-file(s) or here-documents        
                 in the unit <unit>.                                    
  -m  (modify)   modifies referenced word without changing the level    
                                                                        
example:         vgme -Ed enDE_01 <<< "to do|did|done@tun, machen (UNR)"

You can add new words to an existing unit e.g. enDE_01 in three ways:

create a file as for the installing of a new word unit and type

>>> vgme -Ea enDE_01 /path/to/file.txt
>>> vgme -Ea enDE_01 <<< "to do|did|done@tun, machen (UNR)" # use in this case @ as separator instead of tab
>>> vgme -Ea enDE_01 << here doc

All the words will be installed with level -1 (means not activated for learning now). Use "-Eu" to set the level of the words to "0" (they will be asked). Use "-Ed" to delete words from a unit in the same way. Delete the whole unit with

>>> vgme -Ed enDE_01.txt

I'll write more later.

Regards,
Michael

Last edited by ratzfatz (2016-06-17 11:14:34)


The common language in modern science is broken english wink

Offline

#2 2016-06-04 14:44:37

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: vgme - a immature program for learning vocabulary damn quickly.

sounds interesting.
which languages are currently supported?
and where is the script??

Offline

#3 2016-06-04 15:23:37

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: vgme - a immature program for learning vocabulary damn quickly.

Docbroke wrote:

sounds interesting.
which languages are currently supported?
and where is the script??

Hello,

thank you. One person is motivation enough to go on. I have to learn a bit about how to properly host a package in the AUR (never did that before) but you can download a testing version ----. Simply install it with "pacman -U". The package will also create a folder ~/.vgme which will not be removed if you uninstall the programm again so you have to do manually if you uninstall the program.

To get started you need to create a file. Like this

vim enDE_01.txt

regard:
- write the new language (aa) left, the known language (BB) right
- separate the aa- and BB-column with Tab
- use () to write comments within it. Use it only once in each column and only at the end of a column
- separate irregular words or adjective forms with | and words (different translations for a word) with , or ;

to do|did|done	tun, machen (irregular)
to leave|left|left	abfahren, verlassen, zurücklassen (irregular)
to bring|brought|brought	bringen
turmoil	Aufruhr
in the picture	auf dem Bild
to shout	rufen, schreien
old|elder|eldest	alt (Geschwister)

replace "en" with the abbreviation of the language you want to learn with small letters, "DE" with your known language in capital letters. After the underscore you can write two numbers as a name for this unit. You can later add additional words to this unit or you can create a new unit. There is no limitation for words in one unit or for the number of units. I usually have 4600 words in one unit and start a new one thereafter because it's a motivation for me to finish one unit.

After creating that file install it with

vgme -Ei path/to/the/file/aaBB_01.txt

next step is to activate the unit by setting the level of at least one word from "-1" (not activated) to "0". Do that with:

vgme -L aaBB_01:1

This command chooses a random word and set the level to "0". All other words in the unit will still leave with the level "-1" and will not be asked until they are activated too but you can already find them with the "-F" operator.

The help files (vgme -h) are written in German yet. I'll take care for a translation soon.

vgme -Odr -L enDE_01:5

the Option "-Odr" (order by delay (time went by since the word should have been repeated) reverse) is helpful for learning new words. Regard also not to write ":5" again if you're done with repeating the words and you start the programme again, otherwise you'll activate 5 new words (except you want to do that).

edit: You can use it for each language you can write with your keyboard. You can use "setxbmap" and you can also use fctix. I modified my keyboard layout so that I can write German, French and Spanish without switching between any keyboard layouts and switch between those modified keyboard layout and pinyin (for Chinese) with fcitx. Unfortunately it works only after I started a X-server which is one of innumerable weak points of the programme but hey that's for what I am asking for help in the community.


Regards,

Michael

Last edited by ratzfatz (2016-06-13 13:28:48)


The common language in modern science is broken english wink

Offline

#4 2016-06-04 16:40:23

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: vgme - a immature program for learning vocabulary damn quickly.

If you want to check your script for common mistakes, try running it through ShellCheck.

I'm a bash newbie too and I find it invaluable.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2016-06-04 16:59:12

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: vgme - a immature program for learning vocabulary damn quickly.

slithery wrote:

If you want to check your script for common mistakes, try running it through ShellCheck.

I'm a bash newbie too and I find it invaluable.

Hey, thank you! I never heard of that before. Seems pretty helpful. Anyway, I guess a good programmer wouldn't use a bash script for something of that size at all but it was the only way how I could bring the programme into being with my knowledge. I'd really appreciate if we could make it better together. I'll try to describe more and more of the functionality step by step because I think it's really a useful tool even at the current state. It also supports to listen to spoken words. So one can each time when a word is repeated listen to the pronunciation. That helps a lot! (Oh dear - without that it would be impossible for me to pronounce "apothecary").

Last edited by ratzfatz (2016-06-04 17:02:19)


The common language in modern science is broken english wink

Offline

#6 2016-06-04 17:11:32

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: vgme - a immature program for learning vocabulary damn quickly.

Is there any form of space repetition algorithm implemented?

Offline

#7 2016-06-04 17:32:06

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: vgme - a immature program for learning vocabulary damn quickly.

Spyhawk wrote:

Is there any form of space repetition algorithm implemented?

A word (actually a "half word", means one direction aa-->BB) can have a level between -1 (not activated) until 20 (highest level). The "directions" aa-->BB and BB-->aa are asked independently and have independent levels.

level    pause
0->1     0  seconds
1->2     30 seconds
2->3     2  minutes 
3->4     5  minutes
4->5     10 minutes
5->6     30 minutes
6->7     2  hours
7->8     1  day
8->9     2  days
9->10    4  days
10->11   1 week
11->12   2 weeks
12->13   1 month
13->14   2 months
14->15   3 months
15->16   6 months
16->17   1 year
17->18   2 years
18->19   5 years 
19->20   10 years
20->20   20 years

In the current version it's not possible to customize those intervals (but it wouldn't be a big deal to change). What the programme not does (but what would be pretty cool) is to learn from the mistakes of the user and modify the gaps between two levels word- and learner-specificly. The gap e.g. between 16 and 17 is not exactly a year. It is a time beween 0.9*1 year and 1.1*1 year because I want to avoid that aa-->BB is asked instantly after BB-->aa for the same word pair. It's not a great art to know that the translation of "to do" is "tun" if I was asked for the translation of "tun" 10 minutes before.

edit: If an answer is wrong the level of the word will go 4 levels back.
edit 2: It's a lot to write to explain the usage of the programme completely so I'll do it gradually. If somebody is interested I can offer to skype and show it (ask in a private message).

Last edited by ratzfatz (2016-06-04 18:23:03)


The common language in modern science is broken english wink

Offline

#8 2016-06-05 11:53:59

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: vgme - a immature program for learning vocabulary damn quickly.

Thanks for your posting, and work. Your english looks to be better than mine, but I was only born english and have been speaking it for over 50 years! smile
I will be using your script to learn spanish vocab.


You can like linux without becoming a fanatic!

Offline

#9 2016-06-11 10:57:28

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: vgme - a immature program for learning vocabulary damn quickly.

chickenPie4tea wrote:

Thanks for your posting, and work. Your english looks to be better than mine, but I was only born english and have been speaking it for over 50 years! smile
I will be using your script to learn spanish vocab.

Did you try it out?

It seems that the interest in this programme is not very high. Nevertheless I'd be happy for each kind of feedback. I'd like to improve the programme and if there is at least one person interested in it, I'd write a documentation and translate the help one gets typing 'vgme -h' in English. I'd also appreciate if sb. could help me improving the programme. If there's anybody out there who has an interest in that, don't hesitate to contact me.


The common language in modern science is broken english wink

Offline

#10 2016-06-11 12:20:18

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: vgme - a immature program for learning vocabulary damn quickly.

Could you upload this to a git hoster, like savannah? Unzipping and comparing archives gets old after a while. smile


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#11 2016-06-11 12:53:51

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: vgme - a immature program for learning vocabulary damn quickly.

Hello,

thank you for your message. I know that unzipping stuff is not a nice solution. It's just that I have neither much experience with git nor with writing PCKBUILDs properly. I've uploaded the program at bitbucket but I am not sure how to modify my PCKBUILD file to download those files from this source. It'd be great if someone would be patient enough to give me advice for this. smile


Regards,
Michael

Last edited by ratzfatz (2016-06-11 12:54:48)


The common language in modern science is broken english wink

Offline

#12 2016-06-12 19:30:26

dragonfly
Member
From: Nagpur, India
Registered: 2016-05-10
Posts: 21

Re: vgme - a immature program for learning vocabulary damn quickly.

hi ratzfatz,
In your pkgbuild I've made some changes as follows which is working fine on my machine with 'makepkg -s' command. It's not very efficient, but it's working.
I found 'download' section in bitbucket, from where you can get source url, and accordingly you can make changes in PKGBUILD.

# Maintainer: Michael Ehmann <MichaelEhmann@gmx.de>
pkgname=vgme
pkgver=0.1.0
pkgrel=10
pkgdesc="Ein Vokabeltrainer für die Konsole, der das Karteikartenprinzip nutzt."
arch=('i686' 'x86_64' 'armv7h')
license=('GPL')
depends=('sqlite3' 'gawk')
optdepends=('mplayer: pronunciation of words')
#changelog=${pkgname}_ChangeLog
#source=(https://bitbucket.org/zyxwvu/vgme/src/a14cc46fb8bc5f9f7d3ab3a5194656d97b78c53e/vgme-0.1.0.tar.gz)
#sha256sums=(405486c9bbc53374818f0d8242bfd5cdc9452b0f86d264d73d1ab040d5f3ce15)
source=("https://bitbucket.org/zyxwvu/vgme/get/c162db814c2c.zip")
sha256sums=(cf942907e6472a9edad559f60da962572a626ba906ecb9e9ebd78c10eeb6bee5)
package() {
    mkdir -p ${pkgdir}/usr/bin
    mkdir -p ${pkgdir}/usr/lib/${pkgname}
    mkdir -p ${pkgdir}/usr/share/${pkgname}
    mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
    mkdir -p ${pkgdir}/etc

    #cp -r ${srcdir}/${pkgname}/${pkgname}.sh    ${pkgdir}/usr/bin/${pkgname}
    #cp -r ${srcdir}/${pkgname}/modules/*        ${pkgdir}/usr/lib/${pkgname}/
    cp -r ${srcdir}/zyxwvu-vgme-c162db814c2c/${pkgname}/${pkgname}.sh    ${pkgdir}/usr/bin/${pkgname}
    cp -r ${srcdir}/zyxwvu-vgme-c162db814c2c/${pkgname}/modules/*        ${pkgdir}/usr/lib/${pkgname}/
    # cp -r ${srcdir}/${pkgname}/audio            ${pkgdir}/usr/share/${pkgname}/
    # cp -r ${srcdir}/${pkgname}/${pkgname}.conf  ${pkgdir}/etc
    # cp -r ${srcdir}/${pkgname}/ToDo         ${pkgdir}/usr/share/doc/${pkgname}/
    # cp -r ${srcdir}/${pkgname}/notes        ${pkgdir}/usr/share/doc/${pkgname}/
    # cp -r ${srcdir}/${pkgname}/examples     ${pkgdir}/usr/share/doc/${pkgname}/
}

Note: I'm also not expert in building pkgbuild. If there are some technical or unconventional problems then let it check from some experts on the forum.

Last edited by dragonfly (2016-06-12 19:38:43)

Offline

#13 2016-06-13 10:30:47

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: vgme - a immature program for learning vocabulary damn quickly.

Hello,

Thank you for your help. In the first post I updated the download file. One can download the PCKBUILD now ant the rest will be downloaded from the source. I'll update this file in the first entry continually.


Regards,
Michael


The common language in modern science is broken english wink

Offline

Board footer

Powered by FluxBB