Jump to content

Help:Lingua Libre/Corrections

From Wikimedia Commons, the free media repository

Correcting Lingua Libre assets on Wikimedia Commons essentially implies records and their filenames, wikitext or their structured data (SDC). During a recording sesssion LinguaLibre.org/app define aspects such as the wikimedia accounts, contributors (voice or signer), languages, words or texts information. The recording files are uploaded to Wikimedia Commons with those provided values, used either (1) in the filename, (2) as values within the wikitext's template, or (3) in the file's SDC. Later bots add further technical aspects such as filesize, time length, and others to the SDC.

Occasionally, information provided during the recording session are later found to be incorrect. We then need to correct dozens or thousands of Wikimedia Commons files in order to fix the erroneous information. This page document ways to mass edit corrections. Editing and corrections of Lingua Libre's List is not covered in this page.

Summary table

[edit]
Modified object Action Before After Tool
Filename Replace : update the language LL-Q25337833 (mis)-Username-house.wav LL-Q7259896 (puj)-Username-house.wav 🦊 Rename Or Replace (RoR)
Wikitext Replace : update the language | language = Q25337833 | language = Q7259896 🦊 Rename Or Replace (RoR)
SDC P:P407 `language of work` 1. Remove, 2. Add : update the language. P407 =Q25337833 → P407 = Q7259896 Mediawiki:Gadget-ACDC.js, see also my User:Yug/common.js) ACDC config
SDC > P9533 transcription > qualifier P407 language of work mis puj I don't know how to mass edit the qualifier while preserving the transcription value.

Rename Or Replace (RoR)

[edit]

RoR, short for Rename or Replace, is a Wikimedia Commons userscripts which allows users to make mass edit on target files or a given category. It use a match-then-replace approach to either mass rename those page (or filename), or replace wikitext content in those pages. Use for Lingua Libre, RoR allows to properly and easily rename hundreds of misnamed files and fix the wiki in their pages when an error was done during the recording session.

Installation

[edit]
  1. 🦊 Install Rename Or Replace (RoR) on your account, follow instructions

Incorrect filenames

[edit]
Screenshot of Wikimedia Commons userscript Rename_or_Replace (RoR), displaying the different field : Target, Action, Match, Replacement, Logs.
The rename function is limited to file mover users. You may apply on Commons:Requests_for_rights#Filemover for this user-right, it takes about 1~2 weeks.
  1. On the right-top, click on "Tools" menu > Click "🦊 Rename Or Replace (RoR)"
  2. Select your action : Rename wikipage
  3. Define your targets : 2 files for tests, then whole group when sure.
  4. Define your match string
  5. Define your replacement string
  6. Test on 2 files first and examine results
  7. Run

Incorrect wikitext

[edit]

In the context of Lingua Libre post-recording session corrections, it is generally used to update the language Qid or add a category.

  1. On the right-top, click on "Tools" menu > Click "🦊 Rename Or Replace (RoR)"
  2. Select your action : Replace wikitext
  3. Define your targets : 2 files for tests, then whole group when sure.
  4. Define your match string
  5. Define your replacement string
  6. Test on 2 files first and examine results
  7. Run

Tips

[edit]

If your match string is not found in the filename or wikitext, then no change will occur. So if only a minority of files of your Category:Lingua Libre pronunciation-puj are misnamed or mislabelled, you may still run this action on the whole category since your match string will only match the erroneous files.

ACDC

[edit]

(ACDC needs a few customization to your common.js. If OpenRefine is better to use and more powerful, no need to documented ACDC)

AC/DC [publish changes button]; Files to edit: [six filenames]; Statements to add: depicts Caroline Zhang with expression, gesture or body pose Biellmann spin; [add statement button]
Screenshot of the gadget.

AC/DC or ACDC, short for Add to Commons / Descriptive Claims, is a gadget to add a collection of structured data statements to a set of files.

Installation

[edit]

Enable the gadget in your preferences. It looks like this:

Add to Commons / Descriptive Claims (ACDC): Add a collection of structured data statements to a set of files. [documentation / talk] 

JavaScript is disabled in your browser.

Customize for Lingua Libre users

[edit]

Add the following to your common.js :

// ACDC for Lingua Libre users
window.acdcFavoritePropertiesToAdd = [
	'P407',     // language of work or name (P407)
	//'P275',   // copyright license (P275) 
	//'P6216',  // copyright status (P6216) 
    'P31',      // instance of : pronunciation Q108167708
    'P407',     // language of work
    'P9533',    // audio transcription
    // 'P3575', // data size
    // 'P2047', // duration
    // 'P1163', // media type
    // 'P4092', // checksum
    'P10893',   // recordist
    'P10894',   // spoken by
    // 'P10135',// recording date
    // 'P585',  // point in time
];
window.acdcEnableRemoveFeature = true ;
window.acdcFavoritePropertiesToRemove = [
    'P407',     // language of work
  //  'P9533',    // audio transcription
];

Incorrect language

[edit]
  1. On the right-top, click on "Tools" menu > Click "AC/DC"
  2. Define targets : 2 files for tests, then whole group when sure.
  3. Define property to remove : P407 > {incorrect value, ex: Q25337833}
  4. Define property to add : P407 > {correct value, ex: Q7259896}
  5. Run

OpenRefine

[edit]
Opening Open Refine on PAWS

OpenRefine is a software with which you can (batch) edit and upload files on Wikimedia Commons. OpenRefine can add and edit structured data. OpenRefine is also available online on PAWS for all Wikimedia users.

Incorrect qualifier

[edit]
  • Create a list of files to edit, for instance with PetScan or SPARQL
  • Open OpenRefine and open the list
  • If needed, edit the data
  • Create a schema
  • Publish changes to Commons

See also

[edit]