This is neat. I notice that you do similar reverse lemmatisation as my Wiktionary API wrapper:
<a href="https://dictionary.nuenki.app/get_definition?language=Finnish&word=aiemminkin" rel="nofollow">https://dictionary.nuenki.app/get_definition?language=Finnis...</a><p>Feel free to use it if you like, it's practically free, and open source if you'd like to host it yourself: <a href="https://github.com/Alex-Programs/nuenki-dictionary">https://github.com/Alex-Programs/nuenki-dictionary</a><p>Looking at your code, you're processing the actual word in a Finnish-specific way. If you'd like to generalise it, you can also just see if the definitions contains `x of y`, where y is a link, and automatically dereference to `y`.