Jump to content

Uiser:BZPN/ScotsCheck

Frae Wikipedia, the free beuk o knawledge

ScotsCheck – an on-wiki leid checker for scowiki that ettles airticle text an classes it as Scots, Inglis, Inglis-heavy or mixed.

The script compares the airticle’s wird-stock against custom dictionars an gies a quick visual analysis panel. It can forby tag airticles that are maistly Inglis.

Ance instawed, the script adds a Check Scots airt tae the page actions menu (or tools menu on mobile).

Clickin it will:

  1. Lowd the Scots, Inglis, an neutral dictionars.
  2. Analyze the visible airticle wikitext (leavin oot templates, references, tables, categories, an selected sections).
  3. Class the airticle as:
    • Scots
    • Inglis
    • Inglis-heavy
    • Inglis-mixed

A popup panel then shaws:

  • Wird counts (Inglis / Scots / Neutral / Unkent)
  • Inglis ratio (per-centage)
  • Total wird count analyzed

The airticle is classed as Inglis or Inglis-heavy, a Tag Airticle button will appear.

Taggin function

[eedit | edit soorce]

Gin uised, the script adds ane o the follaein templates:

  • {{No Scots}} – for Inglis-only airticles
  • {{Fix Scots}} – for Inglis-heavy airticles

The tag includes an automatic date parameter.

Dictionars

[eedit | edit soorce]

ScotsCheck lows three dictionar pages:

Dictionar data is cached in the browser for 1 hour tae cut down API load.

Translation

[eedit | edit soorce]

The script identifies Inglis wirds in the airticle an suggests Scots translations based on the User:BZPN/ScotsCheck/Translations page.

In the Translate tab:

  • Ilka Inglis wird is shawn wi its context frae the airticle.
  • Clickin a wird opens a list o Scots suggestions or lets ye type a manual translation.
  • Ance ye've picked yer translations, click Save Translations tae edit the airticle automatically.

DevMode

[eedit | edit soorce]

Whan devMode is enabled (default: true):

  • Unkent wirds are shawn individually.
  • Wirds can be quicklie added tae:
    • Inglis dictionar (+en)
    • Scots dictionar (+sco)

Classification logic

[eedit | edit soorce]

The script calculates an Inglis ratio based on:

(Inglis + Neutral wirds) / (Inglis + Scots + Neutral)

Thresholds:

  • > 90% → Inglis
  • > 75% → Inglis-heavy
  • Equal Inglis/Scots → Inglis-mixed
  • Mair Scots than Inglis → Scots

Installation

[eedit | edit soorce]

Add the follaein tae yer Common.js:

importScript('Uiser:BZPN/ScotsCheck.js');

Issue reportin

[eedit | edit soorce]

Please report bugs, wrang classifications, or improvement suggestions on the author’s tauk page.