encyclopegia.org

String metric

In mathematics and computer science, a string metric (also known as a string similarity metric or string distance function) is a metric that measures distance ("inverse similarity") between two text strings for approximate string matching or comparison and in fuzzy string searching.[src] A requirement for a string metric (e.g.[src] in contrast to string matching) is fulfillment of the triangle inequality.[src] For example, the strings "Sam" and "Samuel" can be considered to be close.[src] A string metric provides a number indicating an algorithm-specific indication of distance.[src] The most widely known string metric is a rudimentary one called the Levenshtein distance (also known as edit distance).[src] It operates between two input strings, returning a number equivalent to the number of substitutions and deletions needed in order to transform one input string into another.[src] Simplistic string metrics such as Levenshtein distance have expanded to include phonetic, token, grammatical and character-based methods of statistical comparisons.…[src]

In mathematics and computer science, a string metric (also known as a string similarity metric or string distance function) is a metric that measures distance ("inverse similarity") between two text strings for approximate string matching or comparison and in fuzzy string searching.[src] A requirement for a string metric (e.g.[src] in contrast to string matching) is fulfillment of the triangle inequality.[src] For example, the strings "Sam" and "Samuel" can be considered to be close.[src] A string metric provides a number indicating an algorithm-specific indication of distance.[src] The most widely known string metric is a rudimentary one called the Levenshtein distance (also known as edit distance).[src] It operates between two input strings, returning a number equivalent to the number of substitutions and deletions needed in order to transform one input string into another.[src] Simplistic string metrics such as Levenshtein distance have expanded to include phonetic, token, grammatical and character-based methods of statistical comparisons.[src] String metrics are used heavily in information integration and are currently used in areas including fraud detection, fingerprint analysis, plagiarism detection, ontology merging, DNA analysis, RNA analysis, image analysis, evidence-based machine learning, database data deduplication, data mining, incremental search, data integration, malware detection, and semantic knowledge integration.[src] ==List of string metrics== Levenshtein distance, or its generalization edit distance Damerau–Levenshtein distance Sørensen–Dice coefficient Block distance or L1 distance or City block distance Hamming distance Simple matching coefficient (SMC) Jaccard similarity or Jaccard coefficient or Tanimoto coefficient Tversky index Overlap coefficient Variational distance Hellinger distance or Bhattacharyya distance Information radius (Jensen–Shannon divergence) Skew divergence Confusion probability Tau metric, an approximation of the Kullback–Leibler divergence Fellegi and Sunters metric (SFS) Maximal matches Grammar-based distance TFIDF distance metric There also exist functions which measure a dissimilarity between strings, but do not necessarily fulfill the triangle inequality, and as such are not metrics in the mathematical sense.[src] An example of such function is the Jaro–Winkler distance.[src] ==Selected string measures examples== + \frac{m} + \frac{m-t}{m}\right) = \frac{1}{3}\left(\frac{6}{6} + \frac{6}{6} + \frac{6-\frac{2}{2}}{6}\right) = 0.944 m is the number of matching characters; t is half the number of transpositions( "MARTHA"[3]!=H, "MARHTA"[3]!=T ).[src] |- |Most frequent k characters | |MostFreqKeySimilarity(' r e s e a r ch', 's ee king', 2) = 2 |} ==References== ==External links== String Similarity Metrics for Information Integration A fairly complete overview Carnegie Mellon University open source library StringMetric project a Scala library of string metrics and phonetic algorithms Natural project a JavaScript natural language processing library which includes implementations of popular string metrics[src]

21 sentences · 21 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"String metric." encyclopegia.org, 2024, https://encyclopegia.org/wiki/string-metric. Accessed 25 November 2026.

Chicago

"String metric." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/string-metric.

APA

encyclopegia.org. (2024). String metric. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/string-metric

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1239983587 · 0.5 · snapshot enwiki-001239983587

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.