LanguageDetector
@Deprecated public class LanguageIdentifier extends Object
Constructor and Description |
---|
LanguageIdentifier(LanguageProfile profile)
Deprecated.
Constructs a language identifier based on a LanguageProfile
|
LanguageIdentifier(String content)
Deprecated.
Constructs a language identifier based on a String of text content
|
Modifier and Type | Method and Description |
---|---|
static void |
addProfile(String language,
LanguageProfile profile)
Deprecated.
Adds a single language profile
|
static void |
clearProfiles()
Deprecated.
Clears the current map of language profiles
|
static String |
getErrors()
Deprecated.
Returns a string of error messages related to initializing language profiles
|
String |
getLanguage()
Deprecated.
Gets the identified language
|
static Set<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(Map<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.
|
String |
toString()
Deprecated.
|
public LanguageIdentifier(LanguageProfile profile)
profile
- the language profilepublic LanguageIdentifier(String content)
content
- the textpublic static void addProfile(String language, LanguageProfile profile)
language
- an ISO 639 code representing languageprofile
- the language profilepublic String getLanguage()
public boolean isReasonablyCertain()
true
if the distance is smaller then , false
otherwisepublic static void initProfiles()
public static void initProfiles(Map<String,LanguageProfile> profilesMap)
profilesMap
- map of language profilespublic static void clearProfiles()
public static boolean hasErrors()
public static String getErrors()
public static Set<String> getSupportedLanguages()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.