Cover Image

How many Läufer does Otto know?

September, 28. 2019f 2019 - Reading time: 3 minutes

Otto is my German speaking bot and isn't really intelligent yet. He can, as described in the last article, separate types of sentences and answer them meaningfully, but he cannot remember anything yet and, above all, he cannot assess the context in which a conversation is taking place.

A nice example is the Läufer, a German word. The three most well known meanings of Läufer are:

  • Läufer - a runner (athlete)
  • Läufer - a carpet
  • Läufer - a chess piece (bishop)

So how is artificial intelligence supposed to know in which context the Läufer is meant? Understanding first of all means that one knows what it is all about. Then I had the idea that one could create an approximation by always looking at combinations of verb and subject or object in the sentence. In this way, a demarcation of meanings can be established approximately or in many areas. As an example, I would like to mention sentences that allow us humans to recognize immediately, even without prior conversation, what they are about (German word Läufer):

  1. The Läufer wins the race - athlete
  2. The Läufer is knocked out - carpet
  3. The Läufer is beaten - chess piece

The whole thing is, of course, a bit of a hack and there will be nouns to which the same verbs can be applied. On the other hand I can achieve a higher hit rate of the right meaning with very little effort.

In the backend every combination of noun and verb is inserted in a lookup table (last two lines):

Of course Otto must first be taught these differences in meanings. Therefore there is now a menu item Clarification in the web interface:

First, every combination of noun and verb has a unique ID. If the web interface now confirms that two combinations have the same meaning for the noun, then one of the two IDs is deleted, so to speak thrown together.

If, however, the meanings are different, this is noted so that it is not necessary to ask each time again. Otto should keep something. ;-)

It is important whether the noun is a subject or an object - it is already a difference whether the runner beats or is beaten.

Otto is a hobby project for me, which is why I only work on it once when I have time. In the meantime, I've already become half a linguist. I'll tell you people, the German language has a lot to offer. So, so far. May Otto one day become wise.