Skip to content

Capacitor Plugin implementing Language Identification on Android & iOS using Google's on-device ML library - ML Kit

License

Notifications You must be signed in to change notification settings

hemangsk/capacitor-mlkit-language

Repository files navigation

Capacitor ML Kit Language ID

Plugin implementing Language Identification on Android & iOS using Google's on-device ML library - ML Kit

Tests Builds

Why ?

Google's ML Kit SDK helps us to identify the language of a string of text. We can get the string's most likely language as well as a list of all the possible languages alongwith confidence scores. This plugin provides a Typescript API to interact with the native ML Kit libraries on iOS and Android.

Usage

1. Create a LanguageIdentification client

const languageIdentifier: LanguageIdentifier = LanguageIdentification.getClient();

2. Identify Language

const response = await languageIdentifier.identifyLanguage('This is some english');

3. Identify All Possible Languages

const response = await languageIdentifier.identifyPossibleLanguages('This is some english');

Reference

Docs