We need to add version.diff.informal_words credibility signal so that consumers can know the difference in terms of informal 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" : {
"informal_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 [[ https://phabricator.wikimedia.org/T299164 | revision utilitiy ]].
- //Step:3// Get the word tokens in the two wikitexts using [[ https://phabricator.wikimedia.org/T299428 | this utilitiy ]].
- //Step:4// Get the informal words in the two wikitexts using [[ https://phabricator.wikimedia.org/T299584 | this utilitiy ]].
- //Step:5// Populate the required fields using utilities ([[ https://phabricator.wikimedia.org/T299593 | delta ]], [[ https://phabricator.wikimedia.org/T299599 | increase ]], [[ https://phabricator.wikimedia.org/T299607 | decrease ]], [[ https://phabricator.wikimedia.org/T299686 | sum ]], [[ https://phabricator.wikimedia.org/T299699 | proportional delta ]])
Flow:
{F34925006}