NaturalLanguage

class NaturalLanguage : NSObject

A Firebase service that supports natural language APIs.

  • Whether stats collection for the ML Kit Natural Language module is enabled. The stats include API call counts, errors, API call durations, etc. No personally identifiable information is logged. The default value is true.

    The setting is per FirebaseApp and per NaturalLanguage instance, and is persistent across launches of the app. If the user uninstalls the app or clears the app data, the setting will be reset to true. The best practice is to set the flag for each NaturalLanguage instance.

    Declaration

    Swift

    var isStatsCollectionEnabled: Bool { get set }
  • Gets an instance of Firebase NaturalLanguage service for the default Firebase app. This method is thread safe. The default Firebase app instance must be configured before calling this method; otherwise raises FIRAppNotConfigured exception.

    Declaration

    Swift

    class func naturalLanguage() -> Self

    Return Value

    A Firebase NaturalLanguage service instance, initialized with the default Firebase app.

  • Gets an instance of Firebase NaturalLanguage service for the custom Firebase app. This method is thread safe.

    Declaration

    Swift

    class func naturalLanguage(app: FIRApp) -> Self

    Parameters

    app

    The custom Firebase app used for initialization. Raises FIRAppInvalid exception if app is nil.

    Return Value

    A Firebase NaturalLanguage service instance, initialized with the custom Firebase app.

  • Not available. Please use the factory method instead, NaturalLanguage.naturalLanguage().