Typewriter Distance

from Wikipedia, the free encyclopedia
The typewriter distance is illustrated using an American keyboard:
The letters 'u' and 'i' are right next to each other. They are at a distance of 1. To get from the 'h' to the 'k' you have to go over the 'j'. The distance is 2.

The typewriter distance , and keyboard distance , (Engl. Typewriter distance ) is a similarity measure for strings. The distance between two characters is calculated from the distance between these characters on a QWERTZ or QWERTY keyboard.

The typewriter distance is used in addition to the editing distance and the phonetic distance to identify duplicates in databases, for example when data from different sources is to be merged in a database ( data warehousing ).

The distances mentioned can also be used to determine suggestions for corrections for the spell check of word processing software .


Take the strings: "dog" and "child". The distance between 'h' and 'k' on a keyboard is 2, that between 'u' and 'i' is 1. The typewriter distance between “dog” and “child” is 3.