latest changes in the sandbox score script
This commit is contained in:
parent
6cf607ba07
commit
3f22b480eb
@ -29,7 +29,7 @@ while True:
|
|||||||
# model = 'draftquality'
|
# model = 'draftquality'
|
||||||
# model = 'damaging'
|
# model = 'damaging'
|
||||||
# model = 'goodfaith'
|
# model = 'goodfaith'
|
||||||
model = 'goodfaith draftquality'
|
model = 'goodfaith draftquality damaging'
|
||||||
# model = 'wp10'
|
# model = 'wp10'
|
||||||
|
|
||||||
cmd = "echo '{\"rev_id\": "+str(revid)+"}' | ores score_revisions https://ores.wikimedia.org enwiki "+model
|
cmd = "echo '{\"rev_id\": "+str(revid)+"}' | ores score_revisions https://ores.wikimedia.org enwiki "+model
|
||||||
@ -73,9 +73,19 @@ while True:
|
|||||||
... {} likely to be goodfaith,
|
... {} likely to be goodfaith,
|
||||||
... {} likely badfaith.'''.format(revid, true, false)
|
... {} likely badfaith.'''.format(revid, true, false)
|
||||||
|
|
||||||
if model == 'goodfaith draftquality':
|
if model == 'goodfaith draftquality damaging':
|
||||||
true = result['score']['goodfaith']['score']['probability']['true']
|
# pprint(result)
|
||||||
false = result['score']['goodfaith']['score']['probability']['false']
|
|
||||||
|
goodfaith = result['score']['goodfaith']['score']['probability']['true']
|
||||||
|
badfaith = result['score']['goodfaith']['score']['probability']['false']
|
||||||
|
|
||||||
|
warning = ''
|
||||||
|
goodfaith_prediction = result['score']['goodfaith']['score']['prediction']
|
||||||
|
if goodfaith_prediction == False:
|
||||||
|
warning = '\n*THIS PLAYER IS OUT OF THE GAME*\n'
|
||||||
|
|
||||||
|
damaging = result['score']['damaging']['score']['probability']['true']
|
||||||
|
nondamaging = result['score']['damaging']['score']['probability']['false']
|
||||||
|
|
||||||
ok = result['score']['draftquality']['score']['probability']['OK']
|
ok = result['score']['draftquality']['score']['probability']['OK']
|
||||||
vandalism = result['score']['draftquality']['score']['probability']['vandalism']
|
vandalism = result['score']['draftquality']['score']['probability']['vandalism']
|
||||||
@ -84,12 +94,14 @@ while True:
|
|||||||
x = '''\nLatest revid: {}.
|
x = '''\nLatest revid: {}.
|
||||||
The last edit is ...
|
The last edit is ...
|
||||||
... {} likely to be goodfaith,
|
... {} likely to be goodfaith,
|
||||||
... {} likely badfaith.\n
|
... {} likely damaging.\n
|
||||||
|
Some extra information:
|
||||||
The article quality ...
|
The article quality ...
|
||||||
... {} likely to be OK,
|
... {} likely to be OK,
|
||||||
... {} likely to be vandalism,
|
... {} likely to be vandalism,
|
||||||
... {} likely to be spam,
|
... {} likely to be spam,
|
||||||
... {} likely to be an attack.\n'''.format(revid, ok, vandalism, spam, attack, true, false)
|
... {} likely to be an attack.\n
|
||||||
|
{}'''.format(revid, goodfaith, damaging, ok, vandalism, spam, attack, warning)
|
||||||
|
|
||||||
print(x)
|
print(x)
|
||||||
log.write(x)
|
log.write(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user