On Tue, Aug 2, 2016 at 2:23 PM, BinĂ¡ris wikiposta@gmail.com wrote:
given a difflink between two states of a page, is there a way to tell by bot, how many modifications there are? I.e. in how many fragments those two differ? I know, this is not an exact question, but the software itself interprets it somehow as it tries to emphasize differences with colors.
Unless you need to reproduce MediaWiki's exact method of computing diffs (which is actually configuration-dependent), there is no point in relying on the API. Just fetch the two revisions and calculate the distance yourself. The article about edit distance [0] might help you refine the question.
If you are looking for a pywikibot-based solution, editdistance [1] seems like the right library for the job.
[0] https://en.wikipedia.org/wiki/Edit_distance [1] https://pypi.python.org/pypi/editdistance