Skip to content
pubscout

text_analysis

1.0.0+2, released 4 years ago by gmconsult.com.au

Tokenize text, compute readability scores, and evaluate term similarity for NLP applications.

WASM-ready
$ flutter pub add text_analysis
Source repository

What it does

Provides text tokenization, readability measures like Flesch reading ease, keyword extraction, and term similarity metrics such as Damerau-Levenshtein distance and Jaccard similarity.

AI-written summary of version 1.0.0+2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to tokenize text and analyze documents for readability scores.
  • You are building a search or information retrieval system.
  • You need to compare string terms or implement spell-correction algorithms.

Skip it when

  • You need heavy LLM chat completions or advanced neural network machine learning models.

Strengths

  • Comprehensive suite of string similarity metrics and readability scores.
  • Supports customizable tokenization, stemming, and filtering strategies.

Weaknesses

  • API contains a fair amount of boilerplate code and nested structures.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

not documented

import 'package:text_analysis/text_analysis.dart';

final sample = 'The Australian platypus is seemingly a hybrid of a mammal and reptilian creature.';
final textDoc = await TextDocument.analyze(sourceText: sample, analyzer: English.analyzer, nGramRange: NGramRange(1, 3));
print('Flesch Reading Ease: ${textDoc.fleschReadingEaseScore().toStringAsFixed(1)}');