Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9439

difflib-like library supporting moved blocks detection?

Date 2011-07-13 23:13 +0200
Subject difflib-like library supporting moved blocks detection?
From Vlastimil Brom <vlastimil.brom@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1002.1310591600.1164.python-list@python.org> (permalink)

Show all headers | View raw


Hi all,
I'd like to ask about the availability of a text diff library, like
difflib, which would support the detection of moved text blocks.
Currently I am almost happy with the results of
difflib.SequenceMatcher in my app (comparing different versions of
natural language texts), however the only drawback seems to be the
missing detection of moves of the text parts. I was thinking of simply
recomparing the deleted and inserted blocks using difflib again, but
this obviously won't be a general solution.
I found several algorithm discussions, but unfortunately no suitable
python implementation. (E.g. Medite -
http://www-poleia.lip6.fr/~ganascia/Medite_Project - seems to be
implemented in Python but it targets some rather special and probably
much more complex textological issues, than my current needs.)
Does maybe someone know such python library (or possibly a way of
enhancing difflib) for this task (i.e character-wise comparing of
texts - detecting insertion, deletion, substitution and move of text
blocks)?

Thanks in advance,
      Vlastimil Brom

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

difflib-like library supporting moved blocks detection? Vlastimil Brom <vlastimil.brom@gmail.com> - 2011-07-13 23:13 +0200
  Re: difflib-like library supporting moved blocks detection? Chris Torek <nospam@torek.net> - 2011-07-14 04:47 +0000
    Re: difflib-like library supporting moved blocks detection? Vlastimil Brom <vlastimil.brom@gmail.com> - 2011-07-15 23:49 +0200

csiph-web