ml_text_summarizer 1.0.0 copy "ml_text_summarizer: ^1.0.0" to clipboard
ml_text_summarizer: ^1.0.0 copied to clipboard

A lightweight and multilingual extractive text summarizer written in pure Dart. Supports English and Turkish out of the box. Easily extendable to any language.

πŸ“„ ml_text_summarizer #

Pub Version Dart License: MIT

A lightweight, multilingual extractive text summarizer written in pure Dart.
It supports English πŸ‡ΊπŸ‡Έ and Turkish πŸ‡ΉπŸ‡· by default and is easily extensible to other languages.


✨ Features #

  • βœ… Extractive text summarization
  • 🌍 Multilingual stopword support (English & Turkish included)
  • βš™οΈ Pure Dart implementation – no native dependencies
  • 🧩 Easily extensible stopword manager
  • πŸ§ͺ Unit tested
  • πŸš€ pub.dev-ready

πŸ“¦ Installation #

Add the following to your pubspec.yaml:

dependencies:
  ml_text_summarizer: ^1.0.0

Then run:

dart pub get

πŸš€ Usage #

import 'package:ml_text_summarizer/ml_text_summarizer.dart';

void main() {
  final summarizer = TextSummarizer(
    maxSentences: 2,
    language: 'en', // or 'tr' for Turkish
  );

  const text = '''
  Artificial Intelligence is transforming the world by enabling machines to learn from data.
  It helps automate tasks, speed up decision-making, and improve productivity.
  AI is used in healthcare, finance, education, and more.
  ''';

  final summary = summarizer.summarize(text);
  print('Summary:');
  print(summary);
}

πŸ§ͺ Running Tests #

dart test

πŸ“š Example Output #

Input:

"Artificial Intelligence is transforming industries. It enables automation and intelligent decision-making. AI is used in healthcare, finance, and robotics."

Summary:

"Artificial Intelligence is transforming industries. It enables automation and intelligent decision-making."


πŸ”§ Extending to Other Languages #

You can register your own stopword list:

StopwordManager().addLanguage('es', {'el', 'la', 'de', 'que', 'y'});

πŸ“„ License #

MIT Β© 2025 Mehmet Γ‡elik


1
likes
150
points
124
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

A lightweight and multilingual extractive text summarizer written in pure Dart. Supports English and Turkish out of the box. Easily extendable to any language.

Repository (GitHub)
View/report issues

Topics

#nlp #summarization #language #extractive #text

Documentation

API reference

License

MIT (license)

Dependencies

collection

More

Packages that depend on ml_text_summarizer