LanguageDetector@Deprecated
public class LanguageIdentifier
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static double |
CERTAINTY_LIMIT
Deprecated.
|
private double |
distance
Deprecated.
|
private static java.lang.String |
errors
Deprecated.
|
private java.lang.String |
language
Deprecated.
|
private static java.lang.String |
LANGUAGES_KEY
Deprecated.
|
private static java.lang.String |
PROFILE_SUFFIX
Deprecated.
|
private static java.util.Map<java.lang.String,LanguageProfile> |
PROFILES
Deprecated.
The available language profiles.
|
private static java.lang.String |
PROPERTIES_FILE
Deprecated.
|
private static java.lang.String |
PROPERTIES_OVERRIDE_FILE
Deprecated.
|
private static java.util.Properties |
props
Deprecated.
|
| Constructor and Description |
|---|
LanguageIdentifier(LanguageProfile profile)
Deprecated.
Constructs a language identifier based on a LanguageProfile
|
LanguageIdentifier(java.lang.String content)
Deprecated.
Constructs a language identifier based on a String of text content
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
addProfile(java.lang.String language)
Deprecated.
|
static void |
addProfile(java.lang.String language,
LanguageProfile profile)
Deprecated.
Adds a single language profile
|
static void |
clearProfiles()
Deprecated.
Clears the current map of language profiles
|
static java.lang.String |
getErrors()
Deprecated.
Returns a string of error messages related to initializing language profiles
|
java.lang.String |
getLanguage()
Deprecated.
Gets the identified language
|
static java.util.Set<java.lang.String> |
getSupportedLanguages()
Deprecated.
Returns what languages are supported for language identification
|
static boolean |
hasErrors()
Deprecated.
Tests whether there were errors initializing language config
|
static void |
initProfiles()
Deprecated.
Builds the language profiles.
|
static void |
initProfiles(java.util.Map<java.lang.String,LanguageProfile> profilesMap)
Deprecated.
Initializes the language profiles from a user supplied initialized Map.
|
boolean |
isReasonablyCertain()
Deprecated.
Tries to judge whether the identification is certain enough
to be trusted.
|
java.lang.String |
toString()
Deprecated.
|
private static final java.util.Map<java.lang.String,LanguageProfile> PROFILES
private static final java.lang.String PROFILE_SUFFIX
private static java.util.Properties props
private static java.lang.String errors
private static final java.lang.String PROPERTIES_OVERRIDE_FILE
private static final java.lang.String PROPERTIES_FILE
private static final java.lang.String LANGUAGES_KEY
private static final double CERTAINTY_LIMIT
private final java.lang.String language
private final double distance
public LanguageIdentifier(LanguageProfile profile)
profile - the language profilepublic LanguageIdentifier(java.lang.String content)
content - the textprivate static void addProfile(java.lang.String language)
throws java.lang.Exception
java.lang.Exceptionpublic static void addProfile(java.lang.String language,
LanguageProfile profile)
language - an ISO 639 code representing languageprofile - the language profilepublic java.lang.String getLanguage()
public boolean isReasonablyCertain()
true if the distance is smaller then 0.022, false otherwisepublic static void initProfiles()
public static void initProfiles(java.util.Map<java.lang.String,LanguageProfile> profilesMap)
profilesMap - map of language profilespublic static void clearProfiles()
public static boolean hasErrors()
public static java.lang.String getErrors()
public static java.util.Set<java.lang.String> getSupportedLanguages()
public java.lang.String toString()
toString in class java.lang.Object