Edit check/TextMatch
TextMatch is an edit check that searches for predetermined queries and, when a match is found, displays the regular edit check dialog along with the corresponding message, title, and actions for that query. Depending on how the check is configured, it might provide an option to delete the matched term, or to replace it. It’s a relatively simple check but can be made robust with the flexibility of the configuration options.

Configuration
[edit]Each configuration in TextMatch EditCheck is a matchItem. See the Example configuration (below) for a few examples.
Match items
[edit]The TextMatch config contains a map (matchItems) where each element is a unique string id/matchItem pair.
Each matchItem then contains:
- Query: What to search for. This can be in various formats:
- A list of terms
- A map of terms and their replacements
- Eventually, regex (T407664)
- Title and message: What will be displayed in the edit check dialog
- Mode: What actions should be provided in the edit check dialog (replace, delete, only dismiss, etc.)
- Config: Various configuration options that operate on the matchItem level instead of on the entire TextMatch editcheck.
- The generic editcheck visibility configurations such as maxEditCount, account, enabled.
- Case sensitivity.
- And in the future, we’d like to support ones like: category, template on page, namespace, and specific page-name.
- Expand: If a match is found, whether to expand the 'problem area' (the area that is highlighted) to be the entire paragraph that contains the match ("paragraph" is the only option)
Anyone with access to EditCheck configurations can create these matchItems.
Testing/demoing instructions
[edit]- Visit a wiki where TextMatchEditCheck is available and you have admin role. Login.
- On said wiki, visit
MediaWiki:Editcheck-config.json - Tap edit
- Insert JSON from the Example configuration or some custom configs that follow the same format.
- If there’s already JSON present, only copy from "textMatch"; not the outermost curly braces
- Visit an article on that same wiki that is likely to contain one of the matches listed in the json
- Open a VisualEditor edit session using the
&ecenable=suggestions,experimentalURL parameter
Example configuration
[edit]Example of what could be configured in MediaWiki:Editcheck-config.json.
{
"textMatch": {
"enabled": true,
"matchItems": {
"potential-LLM": {
"query": [
"enduring",
"enhanced",
"enhance",
"enhances",
"enhancing"
],
"title": "Potential LLM content",
"message": "Is this LLM-generated content? Every edit that incorporates LLM output should be marked as LLM-assisted by identifying the name and, if possible, version of the AI in the edit summary.",
"config": {
"caseSensitive": false,
"enabled": true,
"minOccurrences": 3
},
"expand": "paragraph"
},
"cliches": {
"query": [
"tip of the iceberg",
"white elephant",
"gild the lily",
"take the plunge",
"took the plunge",
"ace up the sleeve",
"bird in the hand",
"twist of fate",
"at the end of the day"
],
"title": "Cliches and idioms",
"message": "Clichés and idioms should generally be avoided in favor of direct, literal expressions.",
"config": {
"account": false,
"enabled": true
}
},
"relative-time-ref": {
"query": [
"recently",
"lately",
"currently",
"today",
"presently",
"to date",
"years ago",
"formerly",
"in the past",
"traditionally",
"yesterday",
"tomorrow",
"in the future",
"to this day"
],
"title": "Relative time references",
"message": "Absolute specifications of time are preferred to relative constructions such as this, because the latter may go out of date.",
"config": {
"account": false,
"enabled": true
}
},
"editorializing": {
"query": [
"notably",
"it should be noted",
"arguably",
"interestingly",
"essentially",
"utterly",
"actually",
"clearly",
"absolutely",
"of course",
"without a doubt",
"indeed",
"happily",
"sadly",
"tragically",
"aptly",
"unfortunately",
"untimely"
],
"title": "Editorializing",
"mode": "delete",
"message": "Use of adverbs such as these, to highlight something as particularly significant or certain without attributing that opinion, should usually be avoided so as to maintain an impartial tone.",
"config": {
"account": false,
"enabled": true
}
},
"puffery": {
"query": [
"legendary",
"greatest",
"acclaimed",
"iconic",
"visionary",
"outstanding",
"leading",
"celebrated",
"popular",
"landmark",
"cutting-edge",
"innovative",
"revolutionary",
"extraordinary",
"brilliant",
"famous",
"renowned",
"remarkable",
"prestigious",
"world-class",
"respected",
"notable",
"virtuoso",
"honorable",
"awesome",
"unique",
"pioneering",
"phenomenal",
"prominent"
],
"title": "Puffery",
"mode": "delete",
"message": "Words such as these are often used without attribution to promote the subject of an article and should usually be avoided.",
"config": {
"account": false,
"enabled": true
}
},
"british-english": {
"query": {
"chiseled": "chiselled",
"humor": "humour",
"somberly": "sombrely",
"airplane": "aeroplane",
"theaters": "theatres",
"labor": "labour"
},
"title": "American English",
"mode": "replace",
"message": "This article requires British English. Fix?",
"config": {
"maximumEditCount": 500,
"account": "loggedin",
"enabled": true
}
}
}
}
}