Package net.sf.okapi.lib.verification
Class SpaceChecker
- java.lang.Object
-
- net.sf.okapi.lib.verification.SpaceChecker
-
public class SpaceChecker extends Object
-
-
Constructor Summary
Constructors Constructor Description SpaceChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcheckSpaces(TextFragment srcFrag, TextFragment trgFrag)Checks and fixes white spaces for a given text fragment.intcheckUnitSpacing(ITextUnit tu, LocaleId trgLoc)Checks and fixes white spaces for a given text unit.
-
-
-
Method Detail
-
checkUnitSpacing
public int checkUnitSpacing(ITextUnit tu, LocaleId trgLoc)
Checks and fixes white spaces for a given text unit. The text unit is passed as a parameter is modified.- Parameters:
tu- original text unittrgLoc- target locale to update- Returns:
- the number of changes done.
-
checkSpaces
public int checkSpaces(TextFragment srcFrag, TextFragment trgFrag)
Checks and fixes white spaces for a given text fragment. The target fragment passed as a parameter is modified.- Parameters:
srcFrag- original fragmenttrgFrag- the fragment to fix.- Returns:
- the number of changes done.
-
-