Bird
0
0

Which of the following operations is NOT counted in the Levenshtein distance calculation?

easy📝 Conceptual Q2 of 15
NLP - Text Similarity and Search
Which of the following operations is NOT counted in the Levenshtein distance calculation?
ADeletion of a character
BTransposition of two adjacent characters
CSubstitution of a character
DInsertion of a character
Step-by-Step Solution
Solution:
  1. Step 1: Identify allowed operations in Levenshtein distance

    Levenshtein distance counts insertions, deletions, and substitutions only.
  2. Step 2: Check which operation is excluded

    Transposition (swapping adjacent characters) is not counted in Levenshtein distance but in a related metric called Damerau-Levenshtein distance.
  3. Final Answer:

    Transposition of two adjacent characters -> Option B
  4. Quick Check:

    Levenshtein excludes transpositions [OK]
Quick Trick: Levenshtein excludes swaps, only insert/delete/substitute [OK]
Common Mistakes:
MISTAKES
  • Including transpositions as edits
  • Confusing with Damerau-Levenshtein
  • Ignoring substitution

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NLP Quizzes