Skip to main content

nass 0.3.0 copy "nass: ^0.3.0" to clipboard
nass: ^0.3.0 copied to clipboard

Arabic text normalization and diacritic-insensitive search for Quran, hadith and heritage texts, with match offsets in the original vocalized text.

example/example.dart

import 'package:nass/nass.dart';

void main() {
  const text = 'إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ';

  // Normalize for search: diacritics removed, letter variants unified.
  print(normalize(text)); // انما الاعمال بالنيات

  // Find a plain query in vocalized text; offsets point into the original.
  for (final m in findAll(text, 'الاعمال')) {
    print('${m.start}-${m.end}: ${m.text}'); // 9-21: الْأَعْمَالُ
  }

  // Highlight the match in the original text.
  print(highlight(text, 'الاعمال'));

  // A key for comparing narrator names.
  print(nameKey('أبي عبدِ الله البخاريّ رحمه الله')); // ابو عبدالله البخاري
}
0
likes
150
points
0
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Arabic text normalization and diacritic-insensitive search for Quran, hadith and heritage texts, with match offsets in the original vocalized text.

Repository (GitHub)
View/report issues

Topics

#arabic #quran #hadith #search #unicode

License

MIT (license)

More

Packages that depend on nass