Class MCRLanguageDetector

java.lang.Object
org.mycore.common.MCRLanguageDetector

public class MCRLanguageDetector extends Object
Detects the language of a given text string by looking for typical words and word endings and used characters for each language. German, english, french, arabic, chinese, japanese, greek and hebrew are currently supported.
Version:
$Revision$ $Date$
Author:
Frank Lützenkirchen
  • Constructor Details

    • MCRLanguageDetector

      public MCRLanguageDetector()
  • Method Details

    • detectLanguageByCharacter

      public static String detectLanguageByCharacter(String text)
    • detectLanguage

      public static String detectLanguage(String text)
      Detects the language of a given text string.
      Parameters:
      text - the text string
      Returns:
      the language code: de, en, fr, ar ,el, zh, he, jp or null