org.mycore.common
Class MCRLanguageDetector

java.lang.Object
  extended by 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 for each language. German, englisch and french are currently supported.

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Frank Lützenkirchen

Constructor Summary
MCRLanguageDetector()
           
 
Method Summary
static String detectLanguage(String text)
          Detects the language of a given text string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCRLanguageDetector

public MCRLanguageDetector()
Method Detail

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 or null