FIRNaturalLanguage


@interface FIRNaturalLanguage : 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

    Objective-C

    @property (getter=isStatsCollectionEnabled, assign, readwrite, nonatomic)
        BOOL statsCollectionEnabled;
  • 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

    Objective-C

    + (nonnull instancetype)naturalLanguage;

    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

    Objective-C

    + (nonnull instancetype)naturalLanguageForApp:(nonnull FIRApp *)app;

    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().

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Gets a smart reply instance that provides suggested replies for input text in English. This method is thread safe.

    Declaration

    Objective-C

    - (nonnull FIRSmartReply *)smartReply;

    Return Value

    A SmartReply instance that provides suggested replies.