public interface Cld2Library
extends com.sun.jna.Library
| Modifier and Type | Method and Description |
|---|---|
String |
_ZN4CLD212LanguageCodeENS_8LanguageE(int language)
To get language code from kLanguageToCode array in CLD2
|
String |
_ZN4CLD212LanguageNameENS_8LanguageE(int language)
To get language name from kLanguageToName array in CLD2
|
int |
_ZN4CLD219GetLanguageFromNameEPKc(String name)
To get language number from kNameToLanguage array in CLD2
|
int |
DetectLanguageSummaryWithHints(byte[] buffer,
int buffer_length,
boolean is_plain_text,
String tld_hint,
int encoding_hint,
int language_hint,
int[] language3,
int[] percent3,
int[] text_bytes,
boolean[] is_reliable)
this is the method used in CLD2 to detect the language, passing in the hints and
references (as java arrays) of the text buffer, language3, percent3, text_bytes and is_reliable fields
|
int DetectLanguageSummaryWithHints(byte[] buffer,
int buffer_length,
boolean is_plain_text,
String tld_hint,
int encoding_hint,
int language_hint,
int[] language3,
int[] percent3,
int[] text_bytes,
boolean[] is_reliable)
buffer - - Bytes of text to be queriedbuffer_length - - The length of bufferis_plain_text - - States whether the text passed in is plain-text or nottld_hint - - Encoding hint, it is from an encoding detector applied to an inputencoding_hint - - Detector hint, such as "en" "en,it", ENGLISHlanguage_hint - - The language code specifying a possible language that may be in the text.language3 - - Contains the top three languages foundpercent3 - - The confidence percentage for each of the top three languages foundtext_bytes - - The amount of non-tag/letters-only text foundis_reliable - - Determines the confidence in the findings - True if the returned language is some amount more probable than
the second best.String _ZN4CLD212LanguageNameENS_8LanguageE(int language)
language - - The language numberString _ZN4CLD212LanguageCodeENS_8LanguageE(int language)
language - - The language numberint _ZN4CLD219GetLanguageFromNameEPKc(String name)
name - - The name of the language to be queriedCopyright © 2015–2017 Hewlett Packard Enterprise Development LP. All rights reserved.