Skip to main content Accessibility help
×
Hostname: page-component-586b7cd67f-r5fsc Total loading time: 0 Render date: 2024-11-22T09:58:09.492Z Has data issue: false hasContentIssue false

Chapter 3 - Comparison Based on String Metric

Published online by Cambridge University Press:  04 June 2020

Marco Patriarca
Affiliation:
National Institute of Chemical Physics and Biophysics, Tallinn
Els Heinsalu
Affiliation:
National Institute of Chemical Physics and Biophysics, Tallinn
Jean Leó Leonard
Affiliation:
Paris-Sorbonne University, Paris
Get access

Summary

A string metric is any metric distance between entitieswhich can be associated with a string. String metric-based methods have beendeveloped and used for tackling various problems, from plagiarism detectionand DNA/RNA analysis, image analysis and recognition, to data mining andintegration, and incremental search, to name a few. In this chapter, weconsider some simple examples of metric distances and apply them to somereal examples related to language.

Levenshtein Distance

The most widely known string metric for measuring the difference between twosequences is the Levenshtein distance, also known asedit distance, named after Vladimir Levenshtein, whoconsidered this distance in 1965 (Levenshtein, 1966).

The Levenshtein distance L(a,b) between two given strings a andb, each composed of a set of characters, is defined asthe minimum number of edit operations, including characteraddition, removal, and replacement, needed to turn a intob or vice versa (see e.g. Apostolico and Galil [1997]).Here is an example of how the Levenshtein distance can be used.

Example: Levenshtein distances between three given words. Let usconsider three different locations in the Basque countries, labeled herewith k = 1, 2, 3, where three correspondingly differentdialects of Basque are spoken, and compare the three variants of the sameword, the Basque word for ‘I am’, in these locations. Thewords are a1 = naiz,a2 = nais, anda3 = nas. Comparing thesethree words with each other, we notice the following relations:

  • a1 = naiz vs.a2 = nais:naiznais by onereplacement operation zs; thus, L12 =L(naiz, nais)= 1.

  • a1 = naiz vs.a3 = nas:naiznaisnas by two edit operations: replacementzs and deletion ofi; so L13 =L(naiz, nas)= 2.

Type
Chapter
Information
Languages in Space and Time
Models and Methods from Complex Systems Theory
, pp. 41 - 78
Publisher: Cambridge University Press
Print publication year: 2020

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×