public static String addSpace ( String word , Language language ) { String space = " " ; if ( word . length ( ) == 1 ) { char c = word . charAt ( 0 ) ; if ( "fr" . equals ( language . getShortCode ( ) ) ) { if ( c == ' ' || c == ' ' ) { space = "" ; } } else { if ( c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' || c == ' ' ) { space = "" ; } } } return space ; }
Adds spaces before words that are not punctuation .