String similarity
String similarity is a measure of how alike or different two strings are based on their lexical or semantic properties.
Ensemble Methods for Machine Learning
A string similarity metric is a function that assigns a numeric score indicating how similar two strings are.
- How it is used
- Uses similarity to clean noisy categories and encode high-cardinality string features for downstream learning algorithms.
- How deep it goes
- Defines the metric and explains its computational challenge, but stops short of detailing individual similarity algorithms.
- Examples
- Uses misspelled job titles, employee-position categories, and a comparison of three encoders in salary prediction.
- What you can do after
- Apply similarity-based encoders to noisy categorical features within a preprocessing and prediction pipeline.
Read how Ensemble Methods for Machine Learning explains string similarity →
Knowledge Graphs and LLMs in Action
String similarity is a measure of how closely two textual character sequences match.
- How it is used
- Supports graph-based entity resolution by generating candidate links between textual mentions.
- How deep it goes
- Defines a baseline using similarity links, domain thresholds, and contextual signals without detailing a full resolution system.
- Examples
- Uses abbreviated person names, shared universities, research topics, surnames, and organization names containing “Foundation.”
- What you can do after
- Apply it via graph links and contextual rules to prioritize possible matches while reducing false positives.
Read how Knowledge Graphs and LLMs in Action explains string similarity →
Related concepts
- compressionmeasures · Compression is the transformation of information into a more compact representation to reduce storage or transmission requirements while retaining information needed for recovery or use.
- embeddinguses · A numerical vector representation of an item or input that encodes features or relationships useful for computational tasks.
- edit distancemeasured by · Edit distance is the minimum number of permitted operations needed to transform one string or sequence into another, commonly counting insertions, deletions, and substitutions.
- character-based string similarityincludes · Character-based string similarity compares strings according to character-level operations such as insertion, deletion, and substitution.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

