Jump to top

ml-natural-language

interface

The Firebase ML Kit service interface.

This module is available for the default app only.

Example

Get the ML Kit service for the default app:

const defaultAppMLKit = firebase.naturalLanguage();

Properties

app

</>

The current FirebaseApp instance for this Firebase service.

app: FirebaseApp;

Methods

identifyLanguage

</>

Identifies the main language for the given text.

identifyLanguage(text: string, options?: LanguageIdentificationOptions): Promise<string>;

identifyPossibleLanguages

</>

Identifies possible languages for the given text.

identifyPossibleLanguages(text: string, options?: LanguageIdentificationOptions): Promise<IdentifiedLanguage[]>;

suggestReplies

</>

Returns suggested replies for a conversation.

suggestReplies(messages: TextMessage[]): Promise<SuggestedReply[]>;