FIRLanguageIdentification


@interface FIRLanguageIdentification : NSObject

The LanguageIdentification class that identifies the main language or possible languages for the given text.

  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Identifies the main language for the given text.

    Declaration

    Objective-C

    - (void)identifyLanguageForText:(nonnull NSString *)text
                         completion:(nonnull FIRIdentifyLanguageCallback)completion;

    Parameters

    text

    The input text to use for identifying the language. Inputs longer than 200 characters are truncated to 200 characters, as longer input does not improve the detection accuracy.

    completion

    Handler to call back on the main queue with the identified language code or error.

  • Identifies possible languages for the given text.

    Declaration

    Objective-C

    - (void)identifyPossibleLanguagesForText:(nonnull NSString *)text
                                  completion:
                                      (nonnull FIRIdentifyPossibleLanguagesCallback)
                                          completion;

    Parameters

    text

    The input text to use for identifying the language. Inputs longer than 200 characters are truncated to 200 characters, as longer input does not improve the detection accuracy.

    completion

    Handler to call back on the main queue with identified languages or error.