Ekstensi:ORES

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:ORES and the translation is 100% complete.
Other languages:
Bahasa Indonesia • ‎English • ‎Türkçe • ‎中文 • ‎日本語
Manual ekstensi MediaWiki
OOjs UI icon advanced.svg
ORES
Status rilis: stabil
ORES extension screenshot.png
Deskripsi Ekstensi ini mengintegrasikan data dari proyek ORES ke dalam tampilan Perubahan Terbaru.
Perancang awal Kunal Mehta, Amir Sarabadani, Adam Roses Wight
Perubahan basis data Ya
Tabel ores_classification
ores_model
Lisensi Lisensi Publik Umum GNU 3.0 atau lebih baru
Unduh
  • $wgOresBaseUrl
  • $wgOresFrontendBaseUrl
  • $wgOresCacheVersion
  • $wgOresAggregatedModels
  • $wgOresWikiId
  • $wgOresEnabledNamespaces
  • $wgOresRevisionsPerBatch
  • $wgOresExcludeBots
  • $wgOresFiltersThresholds
  • $wgOresModelClasses
  • $wgOresUiEnabled
  • $wgOresModels
Terjemahkan ekstensi ORES jika tersedia di translatewiki.net

Periksa matriks penggunaan dan versi.

Vagrant role ores
Masalah Tugas terbuka · Laporkan kekutu

Ekstensi ORES mengintegrasikan data dari layanan ORES ke dalam tampilan Perubahan Terbaru.

Untuk saat ini, layanan sisi belakang ORES hanya diatur untuk wiki Wikimedia, dan terdapat banyak yang perlu dikerjakan untuk memasangnya di instalasi MediaWiki pihak ketiga.

Cuplikan layar

Perubahan yang "perlu ditinjau" dan bisa jadi merusak ditandai di Special:RecentChanges.
Penanda "perlu ditinjau" ditambahkan ke legenda Special:RecentChanges.

Pemasangan

  • Unduh dan letakkan berkas-berkasnya di dalam sebuah direktori yang bernama ORES di folder extensions/ Anda.
  • Tambahkan baris berikut di bawah LocalSettings.php Anda:
    wfLoadExtension( 'ORES' );
    
  • Yes Selesai – Telusuri ke Special:Version di wiki Anda untuk memastikan ekstensinya berhasil dipasang.

Anda perlu menjalankan skrip pemeliharaan CheckModelVersions.php begitu ekstensinya telah diedarkan (dan setelah itu Anda juga bisa menjalankan PopulateDatabase.php)

Variabel konfigurasi

Berikut adalah variabel-variabel konfigurasi dan nilai-nilai baku mereka dan sedikit keterangan tentang mereka.

// URL of the 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' => true ],
    'wp10' => [ 'enabled' => true ],
];
// 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;

Respons layanan ORES

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).

Skema basis data

ORES extension introduces two new tables: ores_model and ores_classification. See the full database schema description.

Aliran kerja ekstensi

Skor

Once an edit is made the extension triggers a job to hit the service and store the results in the ores_classification. 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 ores_classification become deprecated. You can clean these obsolete scores by running PurgeScoreCache.php maintenance script.

Antarmuka

The extension won't show anything when deployed but it will add itself as a beta feature (Ekstensi:BetaFeatures 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.