natural_language 0.0.3 copy "natural_language: ^0.0.3" to clipboard
natural_language: ^0.0.3 copied to clipboard

PlatformiOS

A Flutter plugin of Analyze natural language text and deduce its language-specific metadata.

release Pub Version

natural_language #

A Flutter plugin of Analyze natural language text and deduce its language-specific metadata.

Usage #

Get DominantLanguage #

Finds the most likely language of a piece of text.

  Future<String> getDominantLanguage(String text) async {
    final result = await _naturalLanguage.getDominantLanguage(text) ?? "NULL";
    return result;
  }

Get LanguageHypotheses #

Generates the probabilities of possible languages for the processed text.

  Future<Map<String, double>> getLanguageHypotheses(String text, int withMaximum) async {
    final result = await _naturalLanguage.getLanguageHypotheses(text, withMaximum);
    return result;
  }

isEnglish #

Detects whether it is English.

  Future<bool> isEnglish(String text, double threshold) async {
    final result = await _naturalLanguage.isEnglish(text, threshold) ?? false;
    return result;
  }

3
likes
160
pub points
56%
popularity

Publisher

unverified uploader

A Flutter plugin of Analyze natural language text and deduce its language-specific metadata.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on natural_language