We need to add version.diff.uppercase_words credibility signal so that consumers can know the difference in terms of uppercase 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]
{ "identifier": 1063955750, . . "diff" : { "uppercase_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 uppercase words in the two wikitexts using this utilitiy.
- Step:5 Populate the required fields using utilities (delta, increase, decrease, sum, proportional delta)
Flow: