Package org.mycore.common
Class MCRLanguageDetector
java.lang.Object
org.mycore.common.MCRLanguageDetector
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
detectLanguage
(String text) Detects the language of a given text string.static String
-
Constructor Details
-
MCRLanguageDetector
public MCRLanguageDetector()
-
-
Method Details
-
detectLanguageByCharacter
-
detectLanguage
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
-