billthefarmer / gurgle

Fairly simple android word game
https://billthefarmer.github.io/gurgle/
GNU General Public License v3.0
56 stars 18 forks source link

Feature request: Add German language dictionary support #24

Closed lintux closed 2 years ago

lintux commented 2 years ago

Hi,

would be great to play gurgle in German.

BR lintux

billthefarmer commented 2 years ago

OK, that will be in the next version.

lintux commented 2 years ago

Great thanks

NichtJens commented 2 years ago

(If this is better opened as a new issue, please let me know)

It seems either the German word list or its interpretation is a bit wrong. The first German word I got was "kurzt", which is not a word. Is it possible that "kürzt" (a conjugated form of the verb "kürzen") was meant? In that case, the normal crossword rules say it should be "kuerzt" (which is of course too long for the usage here). Could it be that the interpretation of umlauts is wrong?

lintux commented 2 years ago

@NichtJens - I guess that should better be a new request. I have not had a word with a german umlaut so far but was wondering already how this would be managed. As I understand the word lists are coming from a different project. If these contain words with the umlaut they would either have to be ignored or transformed like this is usually done in German Crosswords. The gurgle keypad is not language specific and does not offer those. For example, Mütze would be then Muetze (ä -> ae, ö -> oe, ü -> ue, ß -> ss) . Seems to me quite some effort and for sure is worth a seperate issue - if the effort is acceptable at all.

billthefarmer commented 2 years ago

Interesting, there are two dictionaries, one from Lexica, which is the longer dictionary for checking that a word has been entered, and one from Lexique, which is the shorter dictionary. I just removed the accents/umlauts as I did for other European languages. There are a couple of French loan words in the dictionaries, which I will not use.

It is fairly simple to use editor facilities to replace umlauts with equivalents and then add the four letter words that have become five, and remove the five letter words that have become six. That will be in the next version.

Screenshot_20220329-154624 1

It's possible to cheat in German using grep...

$ egrep '.uren' src/main/assets/German.txt
euren
huren
kuren
puren
NichtJens commented 2 years ago

I was indeed thinking this could be solved/fixed on the word list without touching the code at all. I was gauging the effort as fairly small if the full word list was around. I could even volunteer to do it, if that helps :)

Simply removing the ¨ from the vowel will not work for German text. The proper replacement is this:

ä -> ae
ö -> oe
ü -> ue
ß -> ss

Some French loan words are commonly used and thus could be fine to keep. Funnily, "voten" (in your example) is a conjugated loan word from English, which is considered only colloquial.