@react-native-ml-kit/identify-languages

1.3.2 • Public • Published

@react-native-ml-kit/identify-languages

React Native On-Device Language Identification w/ Google ML Kit

Getting started

npm install @react-native-ml-kit/identify-languages --save

Linking

React Native > 0.59

CLI autolink feature links the module while building the app.

React Native <= 0.59

react-native link @react-native-ml-kit/identify-languages

Installing Pods

On iOS, use CocoaPods to add the native RNMLKitIdentifyLanguages to your project:

npx pod-install

Usage

import IdentifyLanguages from '@react-native-ml-kit/identify-languages';

const lang = await IdentifyLanguages.identify('Ciao'); // "it" (Italian)

const possibleLangs = await IdentifyLanguages.identifyPossible('Ciao'); // [{ "language": "it", "confidence": 0.9789841771125793 }, { "confidence": 0.012451663613319397, "language": "zh-Latn" }]

/@react-native-ml-kit/identify-languages/

    Package Sidebar

    Install

    npm i @react-native-ml-kit/identify-languages

    Weekly Downloads

    247

    Version

    1.3.2

    License

    MIT

    Unpacked Size

    22.8 kB

    Total Files

    26

    Last publish

    Collaborators

    • a7medev