搜索插件、代码仓与 APP 分类

插件详情v0.3.1

dartarabic

一个特定的阿拉伯语语言库,从 Python 移植到 Dart,提供基本功能以操作阿拉伯字母和文本。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1260
喜欢数
41
Pub 分数
150

安装插件

flutter pub add dartarabic

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

DartArabic 是一个基于 Python 的阿拉伯语库的 Dart 版本,提供操作阿拉伯字母和文本的基本功能。它使开发者能够处理阿拉伯文字的特性,如字母形态、元音符号处理以及文本标准化。该包专为跨平台使用而设计,支持 Android、iOS、Web、macOS、Windows 和 Linux。该包简化了与阿拉伯语相关的文本处理和语言操作任务,对于需要准确处理阿拉伯文的应用程序非常有价值。

适合场景

  • 阿拉伯语文本规范化
  • 处理阿拉伯语变音符号
  • 阿拉伯文字的字母造型
  • 阿拉伯语文本预处理
  • 支持阿拉伯语自然语言处理任务

主要特点

  • 阿拉伯语特定的文本操作
  • 跨平台兼容性
  • 从 Python 库移植
  • 基本阿拉伯语语言功能
  • 轻量且专注

适合对象

  • 阿拉伯语应用
  • 文本处理工具
  • 教育软件
  • 本地化项目
  • NLP 应用

使用建议

  • 仅限基本阿拉伯语操作
  • 无高级语言分析
  • 依赖外部 Python 逻辑
  • 不适合复杂的阿拉伯语语法
  • 需要理解阿拉伯文字体的细微差别

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Dart Arabic

Parsing Arabic text in Dart (Partial) Port of PyArabic http://github.com/linuxscout/pyarabic

Changelog

Usage

Import 'package:dartarabic/dartarabic.dart' and access the static methods in DartArabic class, and Arabic class.

Named Arabic Unicode Letters/Marks

Get strings of Arabic language characters by accessing Arabic class and Arabic.Symbols. for example:

print(Arabic.ALEF);
print(Arabic.BEH);
print(Arabic.TEH);
print(Arabic.Symbols.QUESTION);
print(Arabic.Symbols.SEMICOLON);
print(Arabic.Symbols.SHADDA);

Outputs:

ا
ب
ت
؟
؛
ّ

Some helping lists/maps are also provided:

print(Arabic.NAMES);

Output:

{ا: ألف, ب: باء, ت: تاء, ة: تاء مربوطة, ث: ثاء, ج: جيم, ح: حاء, خ: خاء, د: دال, ذ: ذال, ر: راء, ز: زاي, س: سين, ش: شين, ص: صاد, ض: ضاد, ط: طاء, ظ: ظاء, ع: عين, غ: غين, ف: فاء, ق: قاف, ك: كاف, ل: لام, م: ميم, ن: نون, ه: هاء, و: واو, ي: ياء, ء: همزة, ـ: تطويل, آ: ألف ممدودة, ى: ألف مقصورة, أ: همزة على الألف, ؤ: همزة على الواو, إ: همزة تحت الألف, ئ: همزة على الياء, ً: فتحتان, ٌ: ضمتان, ٍ: كسرتان, َ: فتحة, ُ: ضمة, ِ: كسرة, ّ: شدة, ْ: سكون}

See Api Documentation for all available fields.

Showcase

See all string literals at DartArabic Showcase DartArabic Showcase

DartArabic Methods

stripHarakat

Strip Harakat from arabic word except Shadda. The striped marks are :

  • FATHA, DAMMA, KASRA
  • SUKUN
  • FATHATAN, DAMMATAN, KASRATAN

Example:

print(DartArabic.stripHarakat("الْعَرَبِيّةُ"));

Outputs: العربيّة

stripTashkeel

Strip vowels from a text, include Shadda. The striped marks are :

  • FATHA, DAMMA, KASRA
  • SUKUN
  • SHADDA
  • FATHATAN, DAMMATAN, KASRATAN

Example:

print(DartArabic.stripTashkeel("الْعَرَبِيّةُُ"));

Outputs: العربية

stripDiacritics

Strip arabic diacritics from a text. The striped marks are :

  • Small Alef
  • Harakat + Shadda
  • Quranic marks
  • Extended arabic diacritics

Example:

print(DartArabic.stripDiacritics("الْعَرَبِيّةُُ"));

Outputs: العربية

stripTatweel

Strip tatweel from a text and return a result text. Example:

print(DartArabic.stripTatweel("العـــــربيةُ"));

Outputs: العربيةُ

stripShadda

Strip Shadda from a text and return a result text.

Example:

print(DartArabic.stripShadda("الشّمسيّة"));

Outputs: الشمسية

normalizeLigature

Normalize Lam Alef ligatures into two letters (LAM and ALEF),and and return a result text. Some systems present lamAlef ligature as a single letter, this function convert it into two letters, The converted letters into LAM and ALEF are :

  • LAM_ALEF
  • LAM_ALEF_HAMZA_ABOVE
  • LAM_ALEF_HAMZA_BELOW
  • LAM_ALEF_MADDA_ABOVE

Example:

print(DartArabic.normalizeLigature("ﻻنحالي ﻷﻹﻵ"));

Outputs: لانحالي لالالا

normalizeHamzaUniform

Standardize the Hamzat into one form of hamza(uniform method), replace Madda by hamza and alef. Replace the LamAlefs by simplified letters.

Example:

print(DartArabic.normalizeHamzaUniform("جاء سؤال الأئمة عن الإسلام آجلا"));

Outputs: جاء سءال الءءمة عن الءسلام ءءجلا

normalizeHamzaTasheel

Standardize the Hamzat into one form of hamza(Tasheel method), replace Madda by hamza and alef. Replace the LamAlefs by simplified letters.

Example:

print(DartArabic.normalizeHamzaTasheel("جاء سؤال الأئمة عن الإسلام آجلا"));

Outputs: جاء سوال الايمة عن الاسلام اجلا

normalizeAlef

Converts all alefs to ALEF_MAMDODA with the exception of Alef maksura

Example:

print(DartArabic.normalizeAlef("بِٱلْهُدَىٰ"));

Outputs: بِالْهُدَا

normalizeLetters

converts non standard letter characters to single letters. e.g HEH_START ﻫ is converted to ه

Example:

print(DartArabic.normalizeLetters("ﻫﻞ"));

Outputs: هل

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。