Performs a pre-processing operation on the input string in the given input language

@param input         The input text
@param inputLanguage The language of the input
@return The post-processed text
347
public final String apply(String input, Language inputLanguage) {
    if (input != null && Config.get(this.getClass(), inputLanguage, "apply").asBoolean(true)) {
      return performNormalization(input, inputLanguage);
    }
    return input;
  }
722125
public String normalize(String input) {
		char[] c = input.toCharArray();
		normalise(c);
		return new String(c);
	}
1088908
public static Vector processAcceptLanguage(String acceptLanguage) {
    	init();
        StringTokenizer languageTokenizer = new StringTokenizer(acceptLanguage, ",");
        TreeMap map = new TreeMap(Collections.reverseOrder());

        while (languageTokenizer.hasMoreTokens()) {
            String language = languageTokenizer.nextToken().trim();
            /* begin pq57399: part 1 */
            if (language == null || language.length() == 0) {
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {
                    logger.logp(Level.FINE, CLASS_NAME,"processAcceptLanguage", "Encountered zero length language token without quality index.. skipping token");
                    logger.logp(Level.FINE, CLASS_NAME,"processAcceptLanguage", "acceptLanguage param = [" + acceptLanguage + "]");
                }
                continue;
            }
            /* end pq57399: part 1 */

            int semicolonIndex = language.indexOf(';');
            Double qValue = new Double(1);

            if (semicolonIndex > -1) {
                int qIndex = language.indexOf("q=");
                String qValueStr = language.substring(qIndex + 2);
                try {
                    qValue = new Double(qValueStr.trim());
                }
                catch (NumberFormatException nfe) {
                    com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(nfe, "com.ibm.ws.webcontainer.srt.SRTRequestUtils.processAcceptLanguage", "215");
                }
                language = language.substring(0, semicolonIndex);
            }
            if (language.length() > 0) { /* added for pq57399: part 2*/
                if ((qValue.doubleValue() > 0) && (language.charAt(0) != '*')) {
                    Vector newVector = new Vector();
                    if (map.containsKey(qValue)) {
                        newVector = (Vector) map.get(qValue);
                    }
                    newVector.addElement(language);
                    map.put(qValue, newVector);
                } /* begin pq57399: part 3 */

            }
            else {
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {
                    logger.logp(Level.FINE, CLASS_NAME,"processAcceptLanguage", "Encountered zero length language token with quality index.. skipping token");
                    logger.logp(Level.FINE, CLASS_NAME,"processAcceptLanguage", "acceptLanguage param = [" + acceptLanguage + "]");
                }

            } /* end pq57399: part 3 */

        }

        if (map.isEmpty()) {
            Vector v = new Vector();
            v.addElement(Locale.getDefault().toString());
            map.put("1", v);
        }
        return new Vector(map.values());
    }
180350
public static String toLanguageTag(Locale locale) {
        return locale.getLanguage() + (hasText(locale.getCountry()) ? "-" + locale.getCountry() : EMPTY);
    }
1293719
public static String toUpperCase(String string, Locale locale) {

    if (locale == null) {
      return toUpperCase(string, STANDARD_LOCALE);
    }
    return string.toUpperCase(locale);
  }
1005645
public Object parseType(String input, Type targetType) {
        return typeParser.parseType(input, targetType);
    }
575756
public static MessengerCode postMessengerCode(Object input) {
		StringEntity stringEntity = toStringEntity(input);
		return postMessengerCode(stringEntity);
	}
100400
public static InputStream toInputStream(String input, String encoding) throws IOException {
        byte[] bytes = input.getBytes(Charsets.toCharset(encoding));
        return new ByteArrayInputStream(bytes);
    }
108196
public final String transform(CharSequence content, File inputFile) {
		return transform(content, inputFile, true);
	}
1149809
public static MultiLanguageText.Builder format(final MultiLanguageText.Builder multiLanguageText) {
        for (final MapFieldEntry.Builder entryBuilder : multiLanguageText.getEntryBuilderList()) {
            final String value = entryBuilder.getValue();
            entryBuilder.clearValue();
            entryBuilder.setValue(format(value));
        }
        return multiLanguageText;
    }
410973
public StrTokenizer reset(final String input) {
        reset();
        if (input != null) {
            this.chars = input.toCharArray();
        } else {
            this.chars = null;
        }
        return this;
    }
943645
public boolean remove(String inputKey, String inputValue) {
        String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER);
        String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER);
        boolean rc = remove(this.values.get(key), value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "remove: " + key + "=" + value + " rc=" + rc);
        }
        return rc;
    }
630481
public String getLang(final Locale locale, final String key) {
        return langs.get(locale.toString()).getProperty(key);
    }
703009
public static String decode(final String input) {
		return new String(decode(input.getBytes(charsetISOLatin1)), charsetUTF8);
	}
207162
public String serviceName_language_POST(String serviceName, OvhPleskLanguageTypeEnum language) throws IOException {
		String qPath = "/hosting/reseller/{serviceName}/language";
		StringBuilder sb = path(qPath, serviceName);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "language", language);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, String.class);
	}
281549
public final String[] toFinalString(Language lang) throws IOException {
    String[] formattedString = new String[1];
    if (formattedToken != null) {
      int readingCount = formattedToken.getReadingsLength();
      formattedString[0] = formattedToken.getToken();

      Pattern pRegexMatch = match.getRegexMatch();
      String regexReplace = match.getRegexReplace();
      if (pRegexMatch != null) {
        formattedString[0] = pRegexMatch.matcher(formattedString[0]).replaceAll(regexReplace);
      }

      String posTag = match.getPosTag();
      if (posTag != null) {
        if (synthesizer == null) {
          formattedString[0] = formattedToken.getToken();
        } else if (match.isPostagRegexp()) {
          TreeSet<String> wordForms = new TreeSet<>();
          boolean oneForm = false;
          for (int k = 0; k < readingCount; k++) {
            if (formattedToken.getAnalyzedToken(k).getLemma() == null) {
              String posUnique = formattedToken.getAnalyzedToken(k).getPOSTag();
              if (posUnique == null) {
                wordForms.add(formattedToken.getToken());
                oneForm = true;
              } else {
                if (SENTENCE_START_TAGNAME.equals(posUnique)
                    || SENTENCE_END_TAGNAME.equals(posUnique)
                    || PARAGRAPH_END_TAGNAME.equals(posUnique)) {
                  if (!oneForm) {
                    wordForms.add(formattedToken.getToken());
                  }
                  oneForm = true;
                } else {
                  oneForm = false;
                }
              }
            }
          }
          String targetPosTag = getTargetPosTag();
          if (!oneForm) {
            for (int i = 0; i < readingCount; i++) {
              String[] possibleWordForms = synthesizer.synthesize(
                  formattedToken.getAnalyzedToken(i), targetPosTag, true);
              if (possibleWordForms != null && possibleWordForms.length > 0) {
                wordForms.addAll(Arrays.asList(possibleWordForms));
              }
            }
          }
          if (wordForms.isEmpty()) {
            if (match.checksSpelling()) {
              formattedString[0] = "";
            } else {
              formattedString[0] = "(" + formattedToken.getToken() + ")";
            }
          } else {
            formattedString = wordForms.toArray(new String[0]);
          }
        } else {
          TreeSet<String> wordForms = new TreeSet<>();
          for (int i = 0; i < readingCount; i++) {
            String[] possibleWordForms = synthesizer.synthesize(formattedToken.getAnalyzedToken(i), posTag);
            if (possibleWordForms != null) {
              wordForms.addAll(Arrays.asList(possibleWordForms));
            }
          }
          formattedString = wordForms.toArray(new String[0]);
        }
      }
    }
    String original;
    if (match.isStaticLemma()) {
      original = matchedToken != null ? matchedToken.getToken() : "";
    } else {
      original = formattedToken != null ? formattedToken.getToken() : "";
    }
    for (int i = 0; i < formattedString.length; i++) {
      formattedString[i] = convertCase(formattedString[i], original, lang);
    }
    // TODO should case conversion happen before or after including skipped tokens?
    IncludeRange includeSkipped = match.getIncludeSkipped();
    if (includeSkipped != IncludeRange.NONE && skippedTokens != null
        && !skippedTokens.isEmpty()) {
      String[] helper = new String[formattedString.length];
      for (int i = 0; i < formattedString.length; i++) {
        if (formattedString[i] == null) {
          formattedString[i] = "";
        }
        helper[i] = formattedString[i] + skippedTokens;
      }
      formattedString = helper;
    }
    if (match.checksSpelling() && lang != null) {
      List<String> formattedStringElements = Arrays.asList(formattedString);
      // tagger-based speller
      List<AnalyzedTokenReadings> analyzed = lang.getTagger().tag(
          formattedStringElements);
      for (int i = 0; i < formattedString.length; i++) {
        AnalyzedToken analyzedToken = analyzed.get(i).getAnalyzedToken(0);
        if (analyzedToken.getLemma() == null && analyzedToken.hasNoTag()) {
          formattedString[i] = "";
        }
      }
    }
    return formattedString;
  }
892736
public LanguageProfile read(InputStream inputStream) throws IOException {
        return OldLangProfileConverter.convert(internalReader.read(inputStream));
    }