Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!

DDO wiki:AutoWikiBrowser/Typos

From DDO wiki
Jump to navigation Jump to search
Shortcuts:

These are the typo regular expressions for RegExTypoFix (Regular Expression Typographical error Fixer, or RETF).

Please add to or improve these regular expressions!

Description

These regular expressions find and fix common misspellings and grammatical errors. The primary advantage of RegExTypoFix over other possible spellchecking engines and approaches is accuracy and the return of only one possible replacement. The rules below are developed to give as few false positives as possible. Errors should be encountered only in extremely rare usages or when parsing other languages (though even then if there are too many false positives the expression will be modified). On everyday English, accuracy should hit 100%.

RegExTypoFix derivatives can be leveraged in other software. This leads to a massively tested, well-vetted set of automatic corrections.

Syntax of the expressions is described in full on the MSDN website, though for the purposes of this page the Well House summary is likely easier to use.

Usage

Everyone using RegExTypoFix should use it responsibly. Check every edit before you make it. If in doubt, SKIP.

AutoWikiBrowser (AWB)

AWB purposely avoids fixing typos in certain areas of the wiki-text. Typo fixing is prevented within: image names, template names and parameters, wikilink targets, text in quotations and italics, and any text that follows a colon or asterisk. If a typo rule matches a wikilink target, this rule will be ignored on the whole page.

When using AWB, you can refresh the typo list by selecting "File → Refresh status/typos" (CTRL+R). This is useful when you are modifying the typo list on Wikipedia while using AWB to test/process the modification (but basic testing should first be done offline—e.g. by using AWB's Regex Tester or "Find and replace").


Adding/changing a misspelling

The syntax for each rule is the following (according to AWB source code):

<Typo word="Optional name for this rule" find="Regex code to detect the error" replace="Replacement for the error"/>

The "word" parameter is optional and any additional spaces between the parameters are ignored.

Before editing this page

  • Note that all typo rules are case-sensitive. This affects how they are written and tested.
  • Test your proposed change by using an ordinary search or an AWB Google Search with a "Find and Replace" configured. This may reveal that your rule will sometimes damage correct text, or may sometimes make the wrong correction. In these cases do not add the rule here; instead, consider adding it to the List of common misspellings.
  • If you do not know how to make a change, suggest it here, where a knowledgeable user will add it for you.
  • Keep in mind that every addition/possibility of a word uses more CPU and slows scanning.
  • Note that only words outside wikimarkup are fixed, so a rule to fix, say, a wiki template will not work on AWB.

Writing typo rules

  • Aim to have a single rule for each root word, prefix, and suffix.
  • Avoid having a rule detect a spelling outside its intended scope (for example, a rule that fixes housa to house must not detect thousand or house). Add word boundaries (\b) to both ends of the regex unless you are matching errors in parts of words or multiple words.
  • Do not expect rules to be applied in the order they appear.
  • Write fast rules:
    • Beginnings are expensive, so be specific in the matching of the first few characters to eliminate possibilities quickly.
    • If possible don't use the quantifiers * and + with anything but a single character. Avoid them entirely if possible, as they put extra strain on CPU and are apt to do other than what you expect.
  • Each rule must be completely independent.
  • Update the rule name if you change something that affects it.
  • Because the typo rules are case-sensitive, be sure to handle all reasonable case possibilities.

Testing typo rules

  • With the AWB Regular Expression tester, AWB's "Find and replace", or something similar before adding here. If you use AWB's "Find and replace", make sure "Case sensitive" is checked for each rule tested.
  • With AWB or WikEd immediately after you add them. If they do not work, remove first, analyze later.

To do

  • Identify and improve rules to avoid false positives.
  • Keep lists sorted alphabetically by word= value.

Typo list

All changes to this list are live. AWB loads directly from this list whenever someone invokes the RETF option.

New Additions

For ease of correcting errors in newly added rules, please add new rules at the top of its appropriate sub-section.

Game Servers

<Typo word="Argonnessen" find="\b[Aa]rgonn?ess?en\b" replace="Argonnessen" />
<Typo word="Cannith" find="\b[Cc]ann?[ei]th\b" replace="Cannith" />
<Typo word="Ghallanda" find="\b[Gg]h?all?anda\b" replace="Ghallanda" />
<Typo word="Khyber" find="\b[Kk]h?[yi]ber\b" replace="Khyber" />
<Typo word="Orien" find="\b[Oo]ri[eo]n\b" replace="Orien" />
<Typo word="Sarlona" find="\b[Ss]arlona\b" replace="Sarlona" />
<Typo word="Thelanis" find="\b[Tt]helanis\b" replace="Thelanis" />
<Typo word="Wayfinder" find="\b[Ww]ay[\s-][Ff]inder\b" replace="Wayfinder" />

NPCs


Monsters

<Typo word="Harry" find="\b[AHah](arry|rr?[ai]etr[iye]e?[ck]os)\b" replace="Arraetrikos" />
<Typo word="Sally" find="\b[Ss]([au]lly|uu?ll?omadi?es)\b" replace="Suulomades" />

Back to top