C# Класс WikiFunctions.Parse.TypoGroup

Represents a group of similar typo regexes
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
GroupSize int
Statistics List
Typos string>>.List

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Add() публичный Метод

Adds one typo regex to the list
public Add ( string typo, string replacement ) : void
typo string
replacement string
Результат void

FixTypos() публичный Метод

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
Результат void

FixTypos2() публичный Метод

public FixTypos2 ( string articleText, string summary, string articleTitle, string originalArticleText ) : void
articleText string
summary string
articleTitle string
originalArticleText string
Результат void

IsSuitableTypo() публичный Метод

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
Результат bool

MakeGroups() публичный Метод

Makes grouped regexes
public MakeGroups ( ) : void
Результат void

TypoGroup() публичный Метод

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
Результат System

Описание свойств

GroupSize публичное свойство

public int GroupSize
Результат int

Statistics публичное свойство

public List Statistics
Результат List

Typos публичное свойство

public List> Typos
Результат string>>.List