Live data from Hacker News

Compressing Icelandic name declension patterns into a 3.27 kB trie

alexharri.com

41–50 of 86 posts

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#41
post #10

For the 800 names that were missing declension data in the database, it seems like the most straightforward thing to do would be to assign their declensions by hand. It shouldn't take a native speaker more than a couple of hours (if some name they haven't seen before is ambiguous, then whatever they guess at least won't sound obviously wrong to other native speakers). Alternatively, very cheap to ask an LLM to do it.…

I wonder if existing LLMs already know these patterns?

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#42
Valiant effort at old-school engineering applied to a niche problem. (Iceland has a population of only around 400,000 people!) As much as I love the geekery of this stuff though, isn't it already a better ROI to get an LLM to generate the strings you need? It has its own other problems (not claiming it'll be perfect) but for something so language related, it makes a lot of sense. Would also work for other languages that have the same problem with declension of proper nouns like Russian or Finnish.

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#43
One more optimization idea: instead of the trie mapping to the suffix string directly, then instead make an array of unique suffixes and let the trie map to the index into the array, e.g.

    const suffixes = [",,,", "a,u,u,u", ",,i,s", ",,,s", "i,a,a,a", ...];
and then use the index of this list in the

    var serializedInput = "{e:{n:{ein:0_r: ...

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#44

I remember that when I was first learning Spanish in high school, I found a piece of (Windows) software that pelted you with a series of pairs of an infinitive and a tense, and you had to conjugate the infinitive accordingly. (Spanish conjugation typically changes the end of the word; irregular verbs tend to involve stem changes). It was fantastic practice and really ingrained the rules; I became a whiz at it. When I…

I used Clozemaster effectively to learn Russian. It's not exactly what out describe, but you can fly through many "clozes" to ingrain the patterns into your brain.

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#45

No idea if Rails copes with this automatically, but it feels like the sort of magic it’s historically been really good at. I remember reading the source code for `pluralise` and finding that someone had encoded the pluralisation rules including irregular cases for Welsh.

Love Rails, there is a method for everything

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#48

An interesting article but I was surprised there was no discussion about what humans do to address this problem?

They stick with the nominative case. That’s the only safe way not to butcher somebody’s name in a language like Estonian that has 14 cases. It’s infinitely easier to update copy to use only nominative than try to apply the cases automatically.

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#49
post #10

For the 800 names that were missing declension data in the database, it seems like the most straightforward thing to do would be to assign their declensions by hand. It shouldn't take a native speaker more than a couple of hours (if some name they haven't seen before is ambiguous, then whatever they guess at least won't sound obviously wrong to other native speakers). Alternatively, very cheap to ask an LLM to do it.…

I see no reason that an LLM should be better at guessing than a trie (unless the actual example was in its training data, in which case a web search would be more appropriate).

I agree. I just like having the guessing done at compile time on principle. It allows you to change a guess, if you find that it's wrong, and convince yourself that you haven't broken any of the other cases where you were previously accidentally right.

Re: Compressing Icelandic name declension patterns into a 3.27 kB trie

#50
post #25

Earlier quoted context omitted.

Software sold today does not require maintenance. Software to work in the future requires maintenance. I am not buying future software. I am buying today software. Increasingly I am not buying software at all.

Even ignoring security, bug fixes, new features, etc it is also not fair that you can get value from the app every month, but the developer doesn't get to capture a reward for any of this value. Having people pay monthly for value they get monthly seems reasonable.

Does that mean you'd be in favor of subscriptions for owning a vehicle, rather than paying outright? Or a house?

The manufacturer/builder gets paid once, and you get value monthly.

Post reply on HN