Wikipedia:WPCleaner/Spelling and typography

From Wikipedia, the free encyclopedia
WPCleaner – 2.05 (August 26, 2022 (2022-08-26)) [±]
WPCleaner

General information about WPCleaner

Discussion

Discuss the application

Typos

Suggestions for spelling and typography

FAQ

Frequently asked questions

Installation

Install instructions

Bug report or feature request · History of changes · Configuration (help, template) · Wikis · Languages · Users · Screenshots


WPCleaner can detect spelling and typography errors, and suggest fixes based on regular expressions. This feature is available during page analysis or Check wiki, if it's correctly configured.

Activating detection[edit]

The detection of spelling and typography errors is treated by WPCleaner as error n°501 for the Check wiki project. So, it's necessary to activate this error for WPCleaner to look for it.

This error can be activated globally for the whole wiki in the configuration file of the Check wiki project, or just for yourself in your own configuration file.

To activate this detection globally for the whole wiki, you just have to complete the configuration file of Check wiki project with something like:

# Configuration for error 501: Spelling and typography
error_501_prio_enwiki=0 END
error_501_head_enwiki=Spelling and typography END
error_501_bot_enwiki=true END

To activate this detection just for yourself, you just have to complete your own configuration file with something like (include the tag <source>...</source>) :

# Configuration for error 501: Spelling and typography
error_501_prio_enwiki=0 END
error_501_head_enwiki=Spelling and typography END
error_501_bot_enwiki=true END

Suggestions[edit]

The suggestions itself are configured with regular expressions allowing to detect potential errors and to suggest fixes. Two formats can be used to define suggestions : a format dedicated to WPCleaner, and a format shared with AWB. It's possible to use both formats at the same time.

WPCleaner format[edit]

To use WPCleaner format, you first need to define a template having one parameter for the regular expression to detect the error, one or more parameters to define possible suggestions, and one optional parameter for a comment. On frwiki, the Suggestion template has been created.

You then have to create one or more pages using this template to really define each suggestion. Regular expressions are using the Java format. On frwiki, it's mainly the fr:Wikipédia:Liste de fautes d'orthographe courantes page.

And then, you have to configure WPCleaner to tell it where are the suggestions and how to interpret them with the general_suggestions parameter, either in the global configuration file for WPCleaner, or in your own configuration file. For example, on frwiki :

# This parameter is used to configure WPCleaner for fixing spelling and typography.
general_suggestions =
  Wikipédia:Liste de fautes d'orthographe courantes|Suggestion|1|2,3,4,5,6|commentaire
  Wikipédia:WPCleaner/Suggestions|Suggestion|1|2,3,4,5,6|commentaire END

AWB format[edit]

WPCleaner can also use suggestions in AWB format,[1] and use the existing list of suggestions for AWB.

You just have to configure WPCleaner to tell it where are the suggestions and how to interpret them with the general_suggestions_typo parameter, either in the global configuration file for WPCleaner, or in your own configuration file. For example, on enwiki :

# This parameter is used to configure WPCleaner for fixing spelling and typography.
general_suggestions_typo =
  Wikipedia:AutoWikiBrowser/Typos END

Notes[edit]

  1. ^ Note: the regular expressions used by WPCleaner being different than the one used by AWB, it's possible that some rules won't be taken into account correctly