Page MenuHomePhabricator

Add Diff Dictionary Words Credibility Signal
Closed, ResolvedPublic5 Estimated Story Points

Description

We need to add version.diff.dictionary_words credibility signal so that consumers can know the difference in terms of dictionary words between the current revision as compared to its parent revision.

The implementation will require a small schema addition and making calls to utilities to populate the field values.

Steps:

  • Step 1: First, need to update the version schema . [pls refer to documentation repo JSON schema/diff.json and delta.json]
{
  "identifier": 1063955750,
   .
   .
   "diff" : {
        "dictionary_words" : {
            "increase": 11,             
            "decrease": 2,
             "sum"      : 9,
             "proportional_increase" : 2,
              "proportional_decrease" : -2.3333         
              }
           }
}
  • Step:2 Get the revision data with the two wikitexts (current rev and parent rev) in the articleupdate handler using revision utilitiy.
  • Step:3 Get the word tokens in the two wikitexts using this utilitiy.
  • Step:4 Get the dictionary words in the two wikitexts using this utilitiy.

Screen Shot 2022-01-20 at 5.12.13 PM.png (932×1 px, 328 KB)

Event Timeline

Lena.Milenko changed the task status from Open to In Progress.May 5 2022, 2:33 AM
Lena.Milenko changed the task status from In Progress to Open.Jul 20 2022, 12:36 PM