搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。