Extension:ORES/nl
De extensie ORES integreert gegevens uit de service ORES in het overzicht Recente wijzigingen.
Op dit moment is de ORES backend service alleen voor Wikimedia wiki's, en er zal echt wel werk gedaan moeten worden om het geschikt te maken voor MediaWiki installaties van derden.
Het is geïnstalleerd op verschillende Wikimedia-sites, maar wordt niet langer geïmplementeerd op nieuwe sites. For newer work on machine learning in Wikimedia, see Machine Learning/Modernization .
Screenshots
Installatie
- Download en plaats de bestanden in de map
ORES
in de mapextensions/
.
Ontwikkelaars en bijdragers van code moeten in plaats daarvan de extensie van Git installeren, met behulp van:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ORES - Voeg de volgende code onderaan het bestand LocalSettings.php toe:
wfLoadExtension( 'ORES' );
- Klaar – Navigeer naar Special:Version op de wiki om te controleren dat de extensie geïnstalleerd is.
U dient het onderhoudsscript CheckModelVersions.php uit te voeren nadat het is ingezet (en daarna kunt u ook PopulateDatabase.php uitvoeren)
If you want to setup a local development environment for MediaWiki + ORES extension using the following ORES extension local development guide :
Configuratie variabelen
Een kleine beschrijving van de configuratie variabelen en de standaardwaarden.
// URL of the ORES service
$wgOresBaseUrl = 'https://ores.wikimedia.org/';
// Either to exclude edits made by bot to score
$wgOresExcludeBots = true;
// Models to score
$wgOresModels = [
'damaging' => [ 'enabled' => true ],
'goodfaith' => [ 'enabled' => true ],
'reverted' => [ 'enabled' => false ],
'articlequality' => [
'enabled' => false,
'namespaces' => [ 0 ],
'cleanParent' => true,
'keepForever'=> true
],
'wp10' => [
'enabled' => false,
'namespaces' => [ 0 ],
'cleanParent' => true,
'keepForever'=> true
],
'draftquality' => [
'enabled' => false,
'namespaces' => [ 0 ],
'types' => [ 1 ],
],
];
// Will replace ORES with Lift Wing for fetching scores
$wgOresUseLiftwing = false;
// URL for Lift Wing - Skippeed if null
$wgOresLiftWingBaseUrl = null;
// Thresholds of different sensitivies in ORES
$wgOresDamagingThresholds = [ 'soft' => 0.7, 'hard' => 0.5 ];
// Namespaces the ORES should score. Empty array means all namespaces.
// If not empty, it will only works on the given namespaces.
// Determine namespaces like [ 0 => true, 120 => true ].
$wgOresEnabledNamespaces = [];
// Database id for ORES service. If not determined, it'll use database name.
// You can choose 'testwiki' that ORES service sends last two digits of rev_id flipped.
// For example: https://ores.wikimedia.org/v1/scores/testwiki/damaging/12345
$wgOresWikiId = null;
Foutopsporing in een ORES-extensie
After we deploy the extension with either ORES or Lift Wing as a backend we can use the steps in the ORES extension debugging guide to make sure it is working fine.
ORES service antwoorden
ORES extension is merely more than an interface to the ORES service. The service returns a probability score of edits being damaging like this (API v1):
{
"724030089": {
"damaging": {
"prediction": false,
"probability": {
"false": 0.8917716518085119,
"true": 0.10822834819148802
}
}
}
}
It means this edit (diff=724030089
) is 10% likely to have caused damage. Note that 90% likely doesn't mean 9 out of ten cases will be vandalism. Choosing thresholds should be done via analysing recall (percentage of vandalism it can catch) or false positive rate. In ORES the "soft" threshold is when recall is 75% (meaning it will include 75% of all damaging edits) and the "hard" threshold is when recall is 90%. You can get the thresholds from model info (an example).
Database schema
ORES extension introduces two new tables: ores_model and ores_classification. See the full database schema description.
Extensie workflow
Scores
Once an edit is made the extension triggers a job to hit the service and store the results in the ores_classification table. It means it will not include scores for edits made before the deployment. In order to fill the database you can run the maintenance script PopulateDatabase.php. It will hits the service and keeps the score for the last 5,000 edits. You can run it several times if needed.
Once a model gets updated to a newer version CheckModelVersions.php maintenance script needs to be ran to update the ores_model table which will cause to scores stored in the ores_classification table become deprecated. You can clean these obsolete scores by running PurgeScoreCache.php maintenance script.
Interface
The extension won't show anything when deployed but it will add itself as a beta feature (Extension:BetaFeatures/nl is a dependency of this extension) and once it's enabled by the user it will use hooks in ChangesList (RecentChanges, Watchlist, and RelatedChanges) in both old and enhanced mode and highlights when score exceeds the given threshold.
Deze uitbreiding wordt gebruikt op een of meerdere Wikimedia projecten. Dit betekent waarschijnlijk dat de uitbreiding stabiel is en goed werkt op dergelijke vaak bezochte websites. Zoek op de naam van deze uitbreiding in Wikimedia's CommonSettings.php en InitialiseSettings.php om te zien waar deze is geïnstalleerd. Een volledige lijst van de uitbreidingen die geïnstalleerd zijn op een bepaalde wiki kan worden gevonden op de Special:Version pagina van de wiki. |
- Stable extensions/nl
- Extensions with invalid or missing type/nl
- GPL licensed extensions/nl
- Extensions in Wikimedia version control/nl
- APIGetAllowedParams extensions/nl
- ApiQueryBaseAfterQuery extensions/nl
- ApiQueryBaseBeforeQuery extensions/nl
- ApiQueryBaseProcessRow extensions/nl
- ApiQueryWatchlistExtractOutputData extensions/nl
- ApiQueryWatchlistPrepareWatchedItemQueryServiceOptions extensions/nl
- BeforePageDisplay extensions/nl
- ChangesListSpecialPageQuery extensions/nl
- ChangesListSpecialPageStructuredFilters extensions/nl
- ContribsPager::getQueryInfo extensions/nl
- ContributionsLineEnding extensions/nl
- EnhancedChangesListModifyBlockLineData extensions/nl
- EnhancedChangesListModifyLineData extensions/nl
- GetPreferences extensions/nl
- LoadExtensionSchemaUpdates extensions/nl
- OldChangesListRecentChangesLine extensions/nl
- RecentChange save extensions/nl
- RecentChangesPurgeRows extensions/nl
- SpecialContributions::formatRow::flags extensions/nl
- SpecialContributions::getForm::filters extensions/nl
- WatchedItemQueryServiceExtensions extensions/nl
- All extensions/nl
- Extensions used on Wikimedia/nl
- ORES/nl