Stems Finnish words. Takes any kinds of words you can throw at it. Even has its own tiny REPL!
output-fast.webm
The above is 10x to give a feel for how the commands work.
Normal-speed video: https://youtu.be/85qwsrGdwZs
Normal-speed video:
Tested on a totally fresh Vagrant install of Ubuntu 22.04. You probably already have some or all of these installed.
# Install the prerequisites
yes | sudo apt update
yes | sudo apt install pip python-is-python3
yes | sudo apt install voikko-fi python-libvoikko python3-click
# clone the repo and run the command!
git clone https://github.com/hiAndrewQuinn/finstem
cd finstem
python finstem.py --help
python finstem.py 'Näin' 'tervetuloa' 'kiltti' 'kissa' 'Nimeni' 'on' 'Jeff'
finstem
supports (experimental) CSV, TSV and JSON formats.
python finstem.py 'Näin' 'tervetuloa' 'kiltti' 'kissa' '.' 'Nimeni' 'on' 'Jeff' --format CSV | csvlook
python finstem.py 'Näin' 'tervetuloa' 'kiltti' 'kissa' '.' 'Nimeni' 'on' 'Jeff' --format TSV | awk '{print $3 " <~> " $2 " <~> " $1}'
python finstem.py 'hyvää' 'huomenta' --format JSON | \
while IFS= read -r line; do
echo "$line" | jq .
done
Use with caution. I haven't used proper libraries for these yet.
echo 'sana' > words.txt
echo 'vaimonille' >> words.txt
echo 'kirjoja' >> words.txt
# Pass each line as an argument to finstem.py
cat words.txt | xargs -n 1 python finstem.py
Requires fzf.
echo '' | fzf --print-query \
--preview-window='bottom:50%' \
--preview "echo {q} | tr ' ' '\n' | xargs -I _ python finstem.py _" \
--bind "enter:execute(echo {q} | tr ' ' '\n' | xargs -I _ python finstem.py _)+abort"
If you don't feel like typing out all that, just run finstem-interactive.sh
.
For use with finfreq10k
when reading a book
finfreq10k
is an Anki deck containing the 10,0000 most common Anki words in
order, made by yours truly. Using it in combination with finstem
creates a
powerful way to target your vocabulary practice to the words you have actually
read that day.