code: 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;
    }
docs: Adds spaces before words that are not punctuation.
  
  @param word Word to add the preceding space.
  @param language
  Language of the word (to check typography conventions). Currently
  French convention of not adding spaces only before '.' and ',' is
  implemented; other languages assume that before ,.;:!? no spaces
  should be added.
  @return String containing a space or an empty string.