Spanish vocabulary building

by Javantea
June 17, 2023

A small project I'm current working on has started, so I thought I'd make a short blog about it.

Let's say that someone made a deck of flash cards for SRS. Assuming you want to use the SRS, you can load the deck and let the software do the work. But what if you don't want to use the SRS?

Step 1: Getting the deck.
First we start with the deck. Once downloaded, you find that it's a zip file with a sqlite database collection.anki2 and a bunch of images and mp3s.

Step 2: Getting the cards.

sqlite3 collection.anki2
.mode csv
.output spanish_deck.csv
select flds from notes;
.output stdout

Step 3, getting the Spanish words without the rest.

a = open('spanish_deck.csv','rb').read().split(b'\n')
a[0].split(b'\x1f')
b = [c.split(b'\x1f')[0][1:] for c in a]
open('spanish_deck1.csv','wb').write(b'\n'.join(b))
a.pop()
d = [c.split(b'\x1f')[2] for c in a]
open('spanish_deck1en.csv','wb').write(b'\n'.join(d))

Step 4, Getting a day worth of words to learn.

randomize2.py 2024-02-19a < spanish_deck1.csv >../2024-02-18rand.txt

python3
a = open('../2024-02-18rand.txt','r').read().split('\n')

a.pop()
''
while '' in a: a.remove('')

a.remove('Key to Abbreviations')

for i, day in enumerate(days):
    open('../day{0:03d}.txt'.format(i)).write('\n'.join(day) + '\n')

So now you have 500 days of words to learn. If you want to find the translation of a word, you can use grep from now on instead of messing around on Wiktionary or Google. Note however that the deck does not do conjugation, so you need to learn that on your own. That is definitely something I wouldn't leave out on a deck.

If you need to hear the word, there are plenty of ways to hear someone say the word, but since the deck comes with audio, we can write a script to find the appropriate file for each word.

#!/usr/bin/env python
import sys
import json

filename = sys.argv[1]

a = json.load(open('media'))

for k in a:
    if a[k] == filename: print(k)

Assuming you name this script lookup_media.py like me, you can use it like this:

grep desconocido spanish_deck.csv 
"desconocido (adj)<img src=""paste-390876383674369.jpg"" />unknown[sound:yandex-1df1726f-4d458998-49b0cc4d-1bacc12c-9a486d4a.mp3]1302"
python3 lookup_media.py yandex-1df1726f-4d458998-49b0cc4d-1bacc12c-9a486d4a.mp3
7769
mplayer 7769

Obviously you could automate this process.

So why am I learning Spanish instead of Portuguese? After completing the tree for Portuguese in Duolingo, I found that doing legendary challenges was simply unproductive. I needed a way to keep using Portuguese everyday without the punishment that legendary challenges inflict. So let's think... Where is there Portuguese for an intermediate learner? Well enter in Portuguese Words.

I I started learning Spanish and Klingon to keep my streak. Qapla'! Spanish turns out to be way easier than intermediate Portuguese, so I kept going. I've been doing Spanish since June 2023 and I suspect that I'll stop and end my streak sometime soon. That's why I'm on the hunt to find a solution just like Portuguese Words.

With any self study one must be a little bit motivated. How does that work? To me, learning 10 new words is what I want. But for you, I don't know. Let's just walk through how I learn my 10 new words.

Words for Day -1
instalar (v)
batalla (nf)
precioso (adj)
contemplar (v)
cada (adj)
heroico (adj)
carcajada (nf)
camino (nm)
obsesión (nf)
bomba (nf)

So for each word, I want to look up a sentence that uses it. For a few of these words I can't. For example precioso is hard to look up in Spanish Wikipedia because there is a disambiguation page. We can find it in the wiktionary and we can look it up on google, but yeah.. Obsesión is a good example of how Spanish Wikipedia is inferior to English Wikipedia. That's unfortunate for Spanish speakers, but I guess they can use English Wikipedia too.

So to my sentences:
Greasemonkey permite al usuario instalar scripts con los que modificar la apariencia de las páginas.
Una batalla se podría definir como un combate entre dos o más contendientes en donde cada uno de ellos tratará de derrotar a los demás.
mi precioso es un anillo muy viejo
Templo -- En su origen, designaba la zona del cielo que el augur utilizaba para contemplar qué aves la atravesaban y en qué sentido, estableciendo así los augurios.
Varón -- La esperanza de vida masculina, como la femenina, varía considerablemente de acuerdo al desarrollo de cada sociedad.
El desnudo heroico o desnudez ideal es un concepto del arte y la cultura clásicos que pretende describir el uso del cuerpo humano desnudo especialmente, pero no sólo, en la escultura griega; pretende indicar que el sujeto humano aparentemente mortal representado en la escultura es en realidad un semidiós, es decir, un héroe.
La última carcajada (en inglés, The Last Laugh) es una película de comedia de 2019 escrita y dirigida por Greg Pritikin.
Un camino, en sentido lato, designa toda vía de comunicación entre dos puntos; en su sentido restringido y más usado, se aplica a las vías terrestres de comunicación.
Obsesión proviene del término latín obsessĭo, que significa "asedio".
Una bomba de tinta es un explosivo por radio control, usado por algunos bancos para frustrar un asalto, haciendo que, mediante una pequeña explosión, el dinero se tiña de rojo poco después del hurto.

Listen to my song! Leave a like or comment if you want.

instalar batalla precioso contemplar cada heroico carcajada camino obsesión bomba

Javantea out.

Permalink

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name