Package org.apache.nutch.analysis.lang.custom

Examples of org.apache.nutch.analysis.lang.custom.LanguageIdentifier


   * Detect language from a String
   * @param text
   * @return detected language
   */
  public static String detectLanguage(String text) {
    LanguageIdentifier li = getLIInstance();

    return li.identify(text);
  }
View Full Code Here


   * @param is
   * @return detected language
   * @throws IOException
   */
  public static String detectLanguage(InputStream is) throws IOException {
    LanguageIdentifier li = getLIInstance();
    return li.identify(is);
  }
View Full Code Here

   * @param charset
   * @return detected language
   * @throws IOException
   */
  public static String detectLanguage(InputStream is, String charset) throws IOException {
    LanguageIdentifier li = getLIInstance();
    return li.identify(is, charset);
  }
View Full Code Here

    return li.identify(is, charset);
  }

  private static LanguageIdentifier getLIInstance() {
    if (langID == null) {
      langID = new LanguageIdentifier();
    }
    return (langID);
  }
View Full Code Here

TOP

Related Classes of org.apache.nutch.analysis.lang.custom.LanguageIdentifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.