Skip to main content

apiverve_languagedetector 1.2.4 copy "apiverve_languagedetector: ^1.2.4" to clipboard
apiverve_languagedetector: ^1.2.4 copied to clipboard

Language Detector is a language detection API that identifies the language of any submitted text string. It returns the primary language, its ISO 639-1 code, and candidate matches ranked by confidence scores.

Language Detector API - Dart/Flutter Client #

Language Detector is a language detection API that identifies the language of any submitted text string. It returns the primary language, its ISO 639-1 code, and candidate matches ranked by confidence scores.

pub package License: MIT

This is the Dart/Flutter client for the Language Detector API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_languagedetector: ^1.2.4

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_languagedetector/apiverve_languagedetector.dart';

void main() async {
  final client = LanguagedetectorClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'text': 'esta es una frase en español. esta API puede detectar fácilmente el idioma'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "primaryLanguage": "spanish",
    "primaryCode": "es",
    "confidenceLevel": "medium",
    "detectedLanguages": [
      {
        "language": "spanish",
        "confidence": 0.38471794871794873,
        "code": "es"
      },
      {
        "language": "portuguese",
        "confidence": 0.2946153846153846,
        "code": "pt"
      },
      {
        "language": "danish",
        "confidence": 0.2464615384615384,
        "code": "da"
      }
    ]
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
130
points
614
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Language Detector is a language detection API that identifies the language of any submitted text string. It returns the primary language, its ISO 639-1 code, and candidate matches ranked by confidence scores.

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_languagedetector