Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hemangsk/capacitor-mlkit-language

Capacitor Plugin implementing Language Identification on Android & iOS using Google's on-device ML library - ML Kit
https://github.com/hemangsk/capacitor-mlkit-language

android capacitor capacitor-plugin ios language-identification mlkit

Last synced: 28 days ago
JSON representation

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

Awesome Lists containing this project

README

        

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](https://developers.google.com/ml-kit/) 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

```typescript
const languageIdentifier: LanguageIdentifier = LanguageIdentification.getClient();
```

#### 2. Identify Language

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

#### 3. Identify All Possible Languages

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

## Reference

[Docs](https://hemangsk.github.io/capacitor-mlkit-language/)