C# Class SILUBS.ScriptureChecks.CapitalizationProcessor

Check capitalization for styles and sentences.
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
CapitalizationProcessor ( IChecksDataSource checksDataSource, StyleCapInfo>.Dictionary allCapitalizedStyles ) : System

Initializes a new instance of the ProcessSentenceFinalPunct class.

ProcessToken ( ITextToken tok, List result ) : void

Processes the Scripture token.

Private Methods

Method Description
CheckForCharStyleCapilizationError ( ITextToken tok, TextTokenSubstring ttsFirstLetter, List result ) : bool

Creates a checking error if character style requires an initial uppercase letter, but the tssFirstLetter is lowercase.

CheckForParaCapitalizationError ( ITextToken tok, TextTokenSubstring ttsFirstLetter, List result ) : bool

Creates a checking error if paragraph style requires an initial uppercase letter, but the tssFirstLetter is lowercase.

GetLengthOfChar ( ITextToken tok, int iBaseCharacter ) : int

Gets the length of the character including any associated diacritics that follow the base character.

GetSubstring ( ITextToken tok, int iChar ) : TextTokenSubstring

Gets the substring for the character starting at position iChar.

IsSentenceFinalPunctuation ( char ch ) : bool

Determines whether the specified character is sentence final punctuation.

RecordCharacterStyle ( ITextToken tok ) : void

Records the character style.

RecordParagraphStyle ( ITextToken tok ) : void

Records the paragraph style.

RemoveAbbreviations ( ITextToken tok ) : string

Removes the abbreviations from a Scripture token.

Method Details

CapitalizationProcessor() public method

Initializes a new instance of the ProcessSentenceFinalPunct class.
public CapitalizationProcessor ( IChecksDataSource checksDataSource, StyleCapInfo>.Dictionary allCapitalizedStyles ) : System
checksDataSource IChecksDataSource The source of data for Scripture checking.
allCapitalizedStyles StyleCapInfo>.Dictionary Dictionary keyed by the style name containing the /// type of style (character/paragraph) and a value indicating why it should begin with /// a capital.
return System

ProcessToken() public method

Processes the Scripture token.
public ProcessToken ( ITextToken tok, List result ) : void
tok ITextToken The token.
result List The result.
return void