Difflib Sequence Matcher Algorithm

Question:

SequenceMatcher is a class available in python module named ‘difflib.’ It can be used for comparing pairs of input sequences. I’m writing a research paper for which I need the steps of the actual algorithm being used for this class. According to the official documentation:

SequenceMatcher is a flexible class for comparing pairs of sequences of any type, so long as the sequence elements are hashable. The basic algorithm predates, and is a little fancier than, an algorithm published in the late 1980’s by Ratcliff and Obershelp under the hyperbolic name "gestalt pattern matching".

Source: https://github.com/python/cpython/blob/main/Lib/difflib.py

This states that the basic algoritm is somehow similar to the algorithm called ‘gestalt pattern matching’ but the documentation fails to specify what the actual algorithm used here is. I need help trying to figure out what that actual algorithm is!

Asked By: Hamza

||

Answers:

Answered By: BAPF123