I trained an AI to generate German placenames
Book your summer vacation in Mörchstedt/Inbach
Last week, while on vacation, I read Dan Hon’s post on generating British placenames using a Torch RNN.
“I can do this, too” or more accurately “das kann ich auch”, I thought and resolved to try this as soon as I got home from my trip (packing too much computing power and relaxation do not mix).
The instructions in Dan’s post are quite easy to follow, I just went with the docker image (remember to set -gpu -1
at the end of every command line).
The biggest challenge, as in so many deep learning projects was to find a good data set. Fortunately the German statistics office offers the aptly-named Gemeindeverzeichnis-Informationssystem GV-ISys des Statistischen Bundesamtes der Bundesrepublik Deutschland.
You can download the Excel or plain text data files (not CSV, but easy enough to clean up with a little bit of sed
-fu and then train your RNN. In the next step, you can then generate long lists of German-sounding place names like this one.
To make things even more believable, create little postcards for each of the towns using Adobe Spark.