LanguageIdentification

  • LanguageIdentification is the entry point for identifying the language of a given text input.

  • It provides methods to get a LanguageIdentifier instance, either with custom options or default settings.

  • LanguageIdentifier is used to perform the actual language identification.

  • Resources associated with a LanguageIdentifier should be released using LanguageIdentifier.close() when no longer needed.

public class LanguageIdentification extends Object

Entry point to get a LanguageIdentifier that identifies language for a given text input.

A LanguageIdentifier is created via getClient(LanguageIdentificationOptions) or getClient() if you wish to use the default options. For example, the code below creates a LanguageIdentifier with default options.

Example:

LanguageIdentifier languageIdentifier = LanguageIdentification.getClient();
 

Public Method Summary

static LanguageIdentifier
getClient(LanguageIdentificationOptions options)
Gets an instance of LanguageIdentifier, which identifies the language for a given text input, with the given options.
static LanguageIdentifier
getClient()
Gets an instance of LanguageIdentifier, which identifies the language for a given text input.

Inherited Method Summary

Public Methods

public static LanguageIdentifier getClient (LanguageIdentificationOptions options)

Gets an instance of LanguageIdentifier, which identifies the language for a given text input, with the given options.

To release the resources associated with an LanguageIdentifier, you should ensure that LanguageIdentifier.close() is called on the resulting LanguageIdentifier instance once it will no longer be used.

public static LanguageIdentifier getClient ()

Gets an instance of LanguageIdentifier, which identifies the language for a given text input.