Class WhitespaceCorrector
- java.lang.Object
-
- net.sf.okapi.steps.whitespacecorrection.WhitespaceCorrector
-
public class WhitespaceCorrector extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWhitespaceCorrector.Punctuationstatic classWhitespaceCorrector.Whitespace
-
Field Summary
Fields Modifier and Type Field Description static Set<WhitespaceCorrector.Whitespace>ALL_WHITESPACEstatic Set<WhitespaceCorrector.Whitespace>HORIZONTAL_TABSstatic Set<WhitespaceCorrector.Whitespace>NONBREAKING_SPACESstatic Set<WhitespaceCorrector.Whitespace>OTHERprotected Set<WhitespaceCorrector.Punctuation>punctuationprotected LocaleIdsourceLocalestatic Set<WhitespaceCorrector.Whitespace>SPACEprotected LocaleIdtargetLocalestatic Set<WhitespaceCorrector.Whitespace>VERTICAL_WHITESPACEprotected Set<WhitespaceCorrector.Whitespace>whitespaceprotected static charWHITESPACE
-
Constructor Summary
Constructors Constructor Description WhitespaceCorrector(LocaleId sourceLocale, LocaleId targetLocale, Set<WhitespaceCorrector.Punctuation> punctuation, Set<WhitespaceCorrector.Whitespace> whitespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTrailingWhitespace(ITextUnit textUnit)ITextUnitcorrectWhitespace(ITextUnit tu)protected booleanisNonSpaceDelimitedPunctuation(char c)protected booleanisSpaceDelimitedPunctuation(char c)protected booleanisWhitespace(char c)protected voidremoveTrailingWhitespace(ITextUnit textUnit)
-
-
-
Field Detail
-
VERTICAL_WHITESPACE
public static final Set<WhitespaceCorrector.Whitespace> VERTICAL_WHITESPACE
-
NONBREAKING_SPACES
public static final Set<WhitespaceCorrector.Whitespace> NONBREAKING_SPACES
-
SPACE
public static final Set<WhitespaceCorrector.Whitespace> SPACE
-
ALL_WHITESPACE
public static final Set<WhitespaceCorrector.Whitespace> ALL_WHITESPACE
-
OTHER
public static final Set<WhitespaceCorrector.Whitespace> OTHER
-
HORIZONTAL_TABS
public static final Set<WhitespaceCorrector.Whitespace> HORIZONTAL_TABS
-
WHITESPACE
protected static final char WHITESPACE
- See Also:
- Constant Field Values
-
sourceLocale
protected LocaleId sourceLocale
-
targetLocale
protected LocaleId targetLocale
-
punctuation
protected Set<WhitespaceCorrector.Punctuation> punctuation
-
whitespace
protected Set<WhitespaceCorrector.Whitespace> whitespace
-
-
Constructor Detail
-
WhitespaceCorrector
public WhitespaceCorrector(LocaleId sourceLocale, LocaleId targetLocale, Set<WhitespaceCorrector.Punctuation> punctuation, Set<WhitespaceCorrector.Whitespace> whitespace)
-
-
Method Detail
-
removeTrailingWhitespace
protected void removeTrailingWhitespace(ITextUnit textUnit)
-
addTrailingWhitespace
protected void addTrailingWhitespace(ITextUnit textUnit)
-
isWhitespace
protected boolean isWhitespace(char c)
-
isSpaceDelimitedPunctuation
protected boolean isSpaceDelimitedPunctuation(char c)
-
isNonSpaceDelimitedPunctuation
protected boolean isNonSpaceDelimitedPunctuation(char c)
-
-