FirebaseNaturalLanguage

public class FirebaseNaturalLanguage extends Object

Entry class for Firebase machine learning natural language services.

To use this class, get an instance via getInstance() or getInstance(FirebaseApp), and then get an instance of a detector. The code below is an example of getting an instance of language identification detector:


 FirebaseLanguageIdentification languageIdentification =
     FirebaseNaturalLanguage.getInstance().getLanguageIdentification();
 Task<List<IdentifiedLanguage>> task =
     languageIdentification.identifyAllLanguages(text);
 

Public Method Summary

static FirebaseNaturalLanguage
getInstance()
Gets an instance of FirebaseNaturalLanguage associated with the default FirebaseApp.
static FirebaseNaturalLanguage
getInstance(FirebaseApp app)
Gets an instance of FirebaseNaturalLanguage associated with the supplied FirebaseApp.
FirebaseLanguageIdentification
getLanguageIdentification()
Gets an instance of FirebaseLanguageIdentification, which identifies the language for a given text input.
FirebaseLanguageIdentification
getLanguageIdentification(FirebaseLanguageIdentificationOptions options)
Gets an instance of FirebaseLanguageIdentification, which identifies the language for a given text input, with the given options.

Inherited Method Summary

Public Methods

public static FirebaseNaturalLanguage getInstance ()

Gets an instance of FirebaseNaturalLanguage associated with the default FirebaseApp.

public static FirebaseNaturalLanguage getInstance (FirebaseApp app)

Gets an instance of FirebaseNaturalLanguage associated with the supplied FirebaseApp.

Parameters
app the FirebaseApp to associate this FirebaseNaturalLanguage with.

public FirebaseLanguageIdentification getLanguageIdentification ()

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

public FirebaseLanguageIdentification getLanguageIdentification (FirebaseLanguageIdentificationOptions options)

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