C# Class WikiFunctions.Parse.TypoGroup

Represents a group of similar typo regexes
Afficher le fichier Open project: reedy/AutoWikiBrowser Class Usage Examples

Méthodes publiques

Свойство Type Description
GroupSize int
Statistics List
Typos string>>.List

Méthodes publiques

Méthode Description
Add ( string typo, string replacement ) : void

Adds one typo regex to the list

FixTypos ( string &articleText, string &summary, string articleTitle, string originalArticleText ) : void

Fixes typos

FixTypos2 ( string articleText, string summary, string articleTitle, string originalArticleText ) : void
IsSuitableTypo ( string typo ) : bool

Returns whether typo is sutable for group: not suitable if Allow regex doesn't match typo, or Disallow regex matches typo

MakeGroups ( ) : void

Makes grouped regexes

TypoGroup ( int groupSize, string match, string dontMatch, string prefix, string postfix ) : System

Creates a group that holds similar typos

Private Methods

Méthode Description
FixTypo ( string &articleText, string &summary, string>.KeyValuePair typo, string articleTitle ) : void

Applies a given typo fix to the article, provided the typo does not also match the article title Updates edit summary based on the first match (value and replacement) of the typo and the total number of replacements

FixTypos ( string &articleText, string &summary, string articleTitle ) : void

Method Details

Add() public méthode

Adds one typo regex to the list
public Add ( string typo, string replacement ) : void
typo string
replacement string
Résultat void

FixTypos() public méthode

Fixes typos
public FixTypos ( string &articleText, string &summary, string articleTitle, string originalArticleText ) : void
articleText string The wiki text to update
summary string The edit summary of the page changes
articleTitle string The title of the wiki page
originalArticleText string The wiki text of the page, without any typo fixes applied
Résultat void

FixTypos2() public méthode

public FixTypos2 ( string articleText, string summary, string articleTitle, string originalArticleText ) : void
articleText string
summary string
articleTitle string
originalArticleText string
Résultat void

IsSuitableTypo() public méthode

Returns whether typo is sutable for group: not suitable if Allow regex doesn't match typo, or Disallow regex matches typo
public IsSuitableTypo ( string typo ) : bool
typo string
Résultat bool

MakeGroups() public méthode

Makes grouped regexes
public MakeGroups ( ) : void
Résultat void

TypoGroup() public méthode

Creates a group that holds similar typos
public TypoGroup ( int groupSize, string match, string dontMatch, string prefix, string postfix ) : System
groupSize int Typos in a batch
match string Regex each typo should match, its first group will be used for extraction
dontMatch string Regex each typo shouldn't match
prefix string
postfix string
Résultat System

Property Details

GroupSize public_oe property

public int GroupSize
Résultat int

Statistics public_oe property

public List Statistics
Résultat List

Typos public_oe property

public List> Typos
Résultat string>>.List