Page MenuHomePhabricator

Make change detection threshold configurable from php
Closed, ResolvedPublic

Description

Motivation
Currently, the threshold when two paragraph are considered the same but changed, or deleted and added, is defined within the c++ library. We want to be able to easily test out different thresholds without having to compile the library every time we do that

Task
Allow the change detection threshold to be configured from within the php environment

Event Timeline

Change 394983 had a related patch set uploaded (by Jkroll; owner: Jkroll):
[mediawiki/php/wikidiff2@master] Make change detection threshold configurable via env var

https://gerrit.wikimedia.org/r/394983

Change 398094 had a related patch set uploaded (by Jkroll; owner: Jkroll):
[mediawiki/php/wikidiff2@master] Make change detection threshold configurable via ini setting

https://gerrit.wikimedia.org/r/398094

Change 398094 had a related patch set uploaded (by Jkroll; owner: Jkroll):

I tried that version of the patch and it works very well. Changes to the threshold can easily be done in the LocalSettings.php by adding something like ini_set( 'wikidiff2.change_threshold', 0.2 );

With the change above I could for example "fix" regressions in these cases:

https://de.wikipedia.org/w/index.php?diff=170728571
https://it.wikipedia.org/w/index.php?title=Colle_Vento&diff=prev&oldid=7897666

It's harder for the next example where 0.145 seems to be the magic border. ( see line 90 ):

https://de.wikipedia.org/w/index.php?title=Internationale_Mathematik-Olympiade&diff=167483670&oldid=167457198

Also the threshold alone seems to be not good enough to get the stuff going on in here:

https://en.wikipedia.org/w/index.php?title=Marbella_Cup&diff=646838927&oldid=645151368
( setting it to 0.015 fixes this completely, 0.08 most of the cases but then the threshold might be completely useless for most other cases )

Change 398094 merged by jenkins-bot:
[mediawiki/php/wikidiff2@master] Make change detection threshold configurable via ini setting

https://gerrit.wikimedia.org/r/398094

WMDE-Fisch moved this task from Review to Done on the WMDE-QWERTY-Sprint-2018-01-09 board.

Change 394983 abandoned by Thiemo Kreuz (WMDE):
Make change detection threshold configurable via env var

Reason:
The ticket is resolved. I believe this draft is obsolete by now. Please reopen if I'm wrong.

https://gerrit.wikimedia.org/r/394983