0

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!

Hamza
  • 65
  • 5
  • This question is off-topic, but a few seconds of search got me [here](https://www.drdobbs.com/database/pattern-matching-the-gestalt-approach/184407970?pgno=5). – erip Sep 03 '22 at 20:36
  • @erip off-topic from what exactly? – Hamza Sep 03 '22 at 20:39
  • I don't think you're reading my question correctly. I don't need the algorithm for gestalt pattern matching. I need to the algorithm being used for sequencematcher class of difflib, which isn't the same as gestalt pattern matching. – Hamza Sep 03 '22 at 20:42
  • Off-topic based on community guidelines. We aren't really a search service -- we help debug code. – erip Sep 04 '22 at 14:38
  • Check this out [Sequence Matcher Algorithm](https://towardsdatascience.com/sequencematcher-in-python-6b1e6f3915fc) – BAPF123 Sep 03 '22 at 20:54

0 Answers0