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 = 'damaging'
|
||||
# model = 'goodfaith'
|
||||
model = 'goodfaith draftquality'
|
||||
model = 'goodfaith draftquality damaging'
|
||||
# model = 'wp10'
|
||||
|
||||
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 badfaith.'''.format(revid, true, false)
|
||||
|
||||
if model == 'goodfaith draftquality':
|
||||
true = result['score']['goodfaith']['score']['probability']['true']
|
||||
false = result['score']['goodfaith']['score']['probability']['false']
|
||||
if model == 'goodfaith draftquality damaging':
|
||||
# pprint(result)
|
||||
|
||||
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']
|
||||
vandalism = result['score']['draftquality']['score']['probability']['vandalism']
|
||||
@ -84,12 +94,14 @@ while True:
|
||||
x = '''\nLatest revid: {}.
|
||||
The last edit is ...
|
||||
... {} likely to be goodfaith,
|
||||
... {} likely badfaith.\n
|
||||
... {} likely damaging.\n
|
||||
Some extra information:
|
||||
The article quality ...
|
||||
... {} likely to be OK,
|
||||
... {} likely to be vandalism,
|
||||
... {} 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)
|
||||
log.write(x)
|
||||
|
Loading…
Reference in New Issue
Block a user