C# Class WikiFunctions.Parse.RegExTypoFix

Show file Open project: reedy/AutoWikiBrowser Class Usage Examples

Public Properties

Property Type Description
resultArticleText string>.Dictionary
resultSummary string>.Dictionary

Public Methods

Method Description
CreateRule ( string find, string replace ) : string

Creates a RETF rule with a placeholder name

CreateRule ( string find, string replace, string name ) : string

Creates a RETF rule

DetectTypo ( string articleText, string articleTitle ) : bool

Checks for known typos on the page

GetStatistics ( ) : List

Returns statistics of typos corrected in the past article

GetTypos ( ) : string>>.List

PerformTypoFixes ( string articleText, bool &noChange, string &summary, string articleTitle ) : string

Performs typo fixes against the article text in multi-threaded mode Typo fixes not performed if no typos loaded or any sic tags on page

RegExTypoFix ( ) : System

Default constructor, typos will be loaded on a new thread from the default location

RegExTypoFix ( ITyposProvider provider ) : System

Constructs an object that will load typos from the specified source in a separate thread

RegExTypoFix ( bool loadThreaded ) : System

Constructs an object that

RegExTypoFix ( bool loadThreaded, ITyposProvider provider ) : System

Default constructor, typos being loaded on separate thread is optional

Private Methods

Method Description
MakeRegexes ( ) : void

TypoError ( string error ) : void

Method Details

CreateRule() public static method

Creates a RETF rule with a placeholder name
public static CreateRule ( string find, string replace ) : string
find string
replace string
return string

CreateRule() public static method

Creates a RETF rule
public static CreateRule ( string find, string replace, string name ) : string
find string
replace string
name string
return string

DetectTypo() public method

Checks for known typos on the page
public DetectTypo ( string articleText, string articleTitle ) : bool
articleText string The wiki text of the article.
articleTitle string Title of the article
return bool

GetStatistics() public method

Returns statistics of typos corrected in the past article
public GetStatistics ( ) : List
return List

GetTypos() public method

public GetTypos ( ) : string>>.List
return string>>.List

PerformTypoFixes() public method

Performs typo fixes against the article text in multi-threaded mode Typo fixes not performed if no typos loaded or any sic tags on page
public PerformTypoFixes ( string articleText, bool &noChange, string &summary, string articleTitle ) : string
articleText string The wiki text of the article.
noChange bool True if no typos fixed
summary string Edit summary
articleTitle string Title of the article
return string

RegExTypoFix() public method

Default constructor, typos will be loaded on a new thread from the default location
public RegExTypoFix ( ) : System
return System

RegExTypoFix() public method

Constructs an object that will load typos from the specified source in a separate thread
public RegExTypoFix ( ITyposProvider provider ) : System
provider ITyposProvider Typos provider to use
return System

RegExTypoFix() public method

Constructs an object that
public RegExTypoFix ( bool loadThreaded ) : System
loadThreaded bool
return System

RegExTypoFix() public method

Default constructor, typos being loaded on separate thread is optional
public RegExTypoFix ( bool loadThreaded, ITyposProvider provider ) : System
loadThreaded bool Whether to load typos on a new thread
provider ITyposProvider Typos provider to use
return System

Property Details

resultArticleText public static property

public static Dictionary resultArticleText
return string>.Dictionary

resultSummary public static property

public static Dictionary resultSummary
return string>.Dictionary