Code Monkey home page Code Monkey logo

mishkal's Introduction

Mishkal

Mishkal Arabic text vocalization software مشكال لتشكيل النصوص العربية

GitHub stars GitHub forks GitHub contributors GitHub issues downloads downloads GitHub license

Developpers: Taha Zerrouki: http://tahadz.com taha dot zerrouki at gmail dot com

Features value
Authors Authors.md
Release 1.10 Bouira
License GPL
Tracker linuxscout/mishkal/Issues
Mailinglist [email protected]
Website tahadz.com/mishkal
Source Github
Download sourceforge
Feedbacks Comments
Accounts @Facebook @Twitter @Sourceforge

Table of Contents

Citation

Please, if you want to cite this software use the following citation

@thesis{zerrouki2020adawat,
author = {Taha Zerrouki},
title = {Towards An Open Platform For Arabic Language Processing},
type = {PhD thesis},
institution = {Ecole Nationale Supérieure d'informatique, Alger, Algérie},
date = {2020},
}

Install

You can Install Mishkal as library or Software

Python lib

pip install mishkal

Install from github

  1. Clone mishkal project from GitHub:
git clone https://github.com/linuxscout/mishkal.git
  1. Install necessary packages:
pip install -r miskal/requirements.txt

Requirments

- pyarabic  : basic arabic library
- sylajone  : aranasyn syntaxical analyzer
- arramooz  : arabic morphological dictionary
- asmai     : semantic analyzer
- CodernityDB :  pure python, fast, NoSQL database, used as cache system to minimize load of morphological analyzer 
- collocations : collocation library ( deprecated)
- libqutrub : verb conjugation library used by morphological analyzer
- maskouk   : collocation library
- naftawayh : word tag library
- qalsadi   ; morphological analyzer
- tashaphyne : light stemmer used by morphological analyzer

Usage

Mishkal provides:

  • Console command line
  • python library
  • GUi interface
  • Web interface
  • API interface

GUI:

  • Windows: MishkalGui.exe

  • GUI: Linux

    python interfaces/gui/mishkal-gui.py
    

Web server (linux, windows)

python3 interfaces/web/mishkal-webserver

Console (linux/windows)

$ python3 bin/mishkal-console.py -f filename

Usage: bin/mishal-console.py  -f filename [OPTIONS]
           bin/mishal-console.py  'السلام عليكم' [OPTIONS]

        [-f | --file = filename]       input file 
        [-o | --outfile = filename]    output file to write vocalized text to, '$FILENAME (Tashkeel).txt' by default
        
        [-h | --help]             outputs this usage message
        [-v | --version]        program version
        [-p | --progress]      display progress status
        [-a | --verbose]       enable verbosity

        * Tashkeel Actions
        -------------------
        [-r | --reduced]        Reduced Tashkeel.
        [-s | --strip]             Strip tashkeel (remove harakat).
        [-c | --compare]      compare the vocalized text with the program output

        * Tashkeel Options
        ------------------
        [-l | --limit]             vocalize only a limited number of line
        [-x | --syntax]         disable syntaxic analysis
        [-m | --semantic]    disable semantic analysis
        [-g | --train]             enable training option
        [-i | --ignore]           ignore the last Mark on output words.
        [-t | --stat]               disable statistic tashkeel

This program is licensed under the GPL License

Example:

>>> import mishkal.tashkeel
>>> vocalizer = mishkal.tashkeel.TashkeelClass()
>>> text = u"تطلع الشمس صباحا"
>>> vocalizer.tashkeel(text)
' تَطْلُعُ الشَّمْسُ صَبَاحًا'
>>> 

JSON connection API التشكيل عن بعد

يمكن استدعاء خدمة الموقع عبر مكتبة جيسون json و ajax من أي موقع، ويمكنك استعمالها في موقعك.

  • طريقة الاستدعاء 1- باستعمال تقنية json مع مكتبة Jquery
<!DOCTYPE html   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
  <div id="result">

</div>
<script>
$().ready(function() {
$.getJSON("http://tahadz.com/mishkal/ajaxGet", {text:"السلام عليكم\nاهلا بكم\nكيف حالكم", action:"TashkeelText"},
  function(data) {
      $("#result").text(data.result);
  });

 });
</script>

الاستدعاء يكون كما يأتي

$.getJSON("http://tahadz.com/mishkal/ajax...", {text:"السلام عليكم\nاهلا بكم\nكيف حالكم", action:"TashkeelText"},

حيث

  • text: النص المطلوب تشكيله.
  • action: العملية المطلوبة وهنا هي TashkeelText.

النتيجة تكون من الشكل

{"result": " السّلامُ عَلَيكُمْ اهلا بِكُمْ كَيْفَ حالُكُمْ", "order": "0"}

حيث

  • result: النص الناتج المشكول.
  • order: رقم السطر في النص الأصلي، فإذا كان النص الأصلي كبيرا يقسمه المشكال لعدد من الاسطر، وقد لا يرجعون في نفس الترتيب، لذا حددنا رقم الترتيب.

How does Mishkal work:

Mishkal use a rule based method to detect relations and diacritics, First, it analyzes all morphological cases, it generates all possible diacritized word forms, by detecting all affixes and check it in a dictionary. second, It add word frequency to each word.

The two previous steps are made by support/Qalsadi ( arabic morphological analyzer), the used dictionary is a separated project named 'Arramooz: arabic dictionnary for morphology".

Third, we use a syntax analyzer to detect all possible relations between words. The syntax library is named support/ArAnaSyn. This analyzer is basic for the moment, it use only linear relations between adjacent words.

Forth, all data generated and relations will be analyzed semantically, to detect semantic relation in order to reduce ambiguity. The use libary is support/asmai ( Arabic semantic analysis). The semantic relations extraction is based on corpus. The used corpus is named "Tashkeela: arabic vocalized texts corpus".

In the final stage, The module mishkal/tashkeel tries to select the suitable word in the context, it tries to get evidents cases, or more related cases, else, it tries to select more probable case, using some rules like select a stop word by default, or select Mansoub case by default.

The rest of program provides functions to handles interfaces and API with web/desktop or command line

Featured Posts

  • كيفية شكيل الحروف والكلمات أو حتى نصوص باللغة العربية في ثواني من خلال متصفحك- رضا بوربعة
  • خدمة عربية جديدة : تشكيل النصوص العربية Sam Hamou
  • إطلاق الإصدار التجريبي برنامج مشكال لتشكيل النصوص العربية Zaid AlSaadi
  • مشكال: الطريق نحو التشكيل مدونة اليراع
  • مشكال لتشكيل النصوص العربية: إطلاق واجهة سطح المكتب مدونة اليراع
  • تعرّف على مشاريع “تحدّث” .. مشاريعٌ للغةٍ عظيمة محمد هاني صباغ

mishkal's People

Contributors

abougouffa avatar assem-ch avatar fahad-alsaidi avatar harabat avatar karlwettin avatar linuxscout avatar lokal-profil avatar mohammad-albarham avatar naskio avatar pahxo avatar valdisvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mishkal's Issues

التشكيل خطأ لحرف عندما

السلام عليكم،
حاليا أستخدم مشكال في تشكيل بعض الكتب، لاحظت أن الحرف "عندما" دائما ما يشكل إلى
عَنْدَمَا
وهذا خطأ واضح والصحيح
عِنْدَمَا

fix data path

Fix the following error:
Fatal Error Can't find the database file ./interfaces/gui/data/collocations.sqlite
Exception AttributeError: "collocationDictionary instance has no attribute 'dbConnect'" in <bound method collocationDictionary.del of <maskouk.collocationdictionary.collocationDictionary instance at 0x7f41d7b67440>> ignored
Fatal Error Can't find the database file ./interfaces/gui/data/collocations.sqlite
Exception AttributeError: "collocationDictionary instance has no attribute 'dbConnect'" in <bound method collocationDictionary.del of <maskouk.collocationdictionary.collocationDictionary instance at 0x7f41d6acb128>> ignored

Exception AttributeError: "collocationDictionary instance has no attribute 'dbConnect'" in <bound method collocationDictionary.del of <maskouk.collocationdictionary.collocationDictionary instance at 0x7f41d6acb128>> ignored

Wrong Haraka

The last letter of the words in the Arabic adjective phrase is wrong haraka. How can I fix this?
Başlıksız

Import Mishkal to Android

We need to run Mishkal under Android, in order to use it to diacritize text before convert it to speech.
Mishkal is a pure python program,
How to run it under Android?

Fix web API problem

واجهة برمجة الوب لا تعمل كما ينبغي فهي ترجع خطأ
$().ready(function() {
$.getJSON("http://tahadz.com/mishkal/ajaxGet", {text:"السلام عليكم\nاهلا بكم\nكيف حالكم", action:"TashkeelText"},
function(data) {
$("#result").text(data.result);
});
يمكن مؤقتا استعمال
action:"Tashkeel2"

Mishkal as a plugin for plain text editors

I'm wondering why do you try to reinvent the wheel and develop a completely new text editor just to perform tashkeel tasks?

Isn't better if it's developed as a plugin for already exist and popular text editors like Xed, GEdit, Kate, and KWrite?

اسم الاستفهام

كَيْفَ حَالِكُمْ?
هنا يعرب حالكم مضافا إليه للاسم كيف
للتصحيح
كيف حالُكم

Error while installing

This is the command I am using:
py -2.7 .\bin\mishkal-console.py

I did not find any module named mysam in the source code

Here is the error:-
File ".\bin\mishkal-console.py", line 115, in
import tashkeel.tashkeel as ArabicVocalizer
File "C:\Code\Repos\Arabic\mishkal\bin../mishkal\tashkeel\tashkeel.py", line 30, in
import mysam.tagmaker
ImportError: No module named mysam.tagmaker

بايثون 3

السلام عليكم
بارك الله فيكم، مشروع رائع وجيد جدا.
اود فقط الاستفسار عن التحديث لدعم البايثون 3، هل تم ذلك ام لا؟
ان وجد، اين يمكنني تحميل النسخة؟

Reorganize the project, make it simple

بعد إلقاء نظرة على المشروع، واجهت مشكلة مع الفرعين

pylint و master

المشكلة أن بعض الملفات تم تعديلها في كلا الفرعين... كنت أود إنشاء فرع مؤقت لأقوم بدمج بعض التغييرات به لكني لم أعرف أي تغييرات يجب دمجها (هذا يتطلب معرفة جيدة ببنية البرنامج)

أثناء تصفحي للملفات المعدلة، وجدت أن بعض المكتبات

كـ aranasyn

قد تم تعديلها!... المشكلة في مثل هذه الحالة أن مشكال يعتمد على هذه المكتبة لكنها ليست جزءً من المشروع... ولهذا يستحسن نقل كل مكتبة إلى مستودع خاص بها، ويتم ربطها بالبرنامج كمكون فرعي

submodule

بهذه الطريقة؛ يصبح من السهل صيانة المكتبة والبرنامج على حد سواء

لقد قمت بإنشاء فريق عمل باسم NLP Koderz

وسأقوم برفع جميع المكتبات التي يستخدمها البرنامج إلى مجموعة مستودعات الفريق، ثم أقوم بربط مشكال بكل مكتبة 😄 عن طريق المكونات الفرعية

submodules

هذا سيجعل البرنامج أكثر تنظيما وأسهل للتطوير والصيانة 👍

Maintain lines order in the result text

Result text is being returned without CR or NL chars, as one long uninterrupted praragraph.
Maintain same line order as in the input arguments.

I will also assist in that, as I become more familiar with the code ^_^

Use POST in GetAjax function instead of GET

It would be great if the GetAjax function used Post instead of a Get, it would allow the tool to support longet texts.

I can't find any documentation for Oukasha web framework to assist with the change. Could you provide any ?

use independent cache system

Use a independent cache system for Qalsadi and Mishkal to be replaced according to execution.

  • Actually, we use CodernityDB, which allow to us to reduce memory consuming on web site.
  • The aim is to add a cache system which can be replaced without problem.

Is there an API I can use from C-Sharp?

I would like to add diacritic marks to single words and/or small sentences at a time using a C-Sharp/.NET app.

Is there a (REST) API I can invoke like:

https://somedomain.com?text="arabic words"

which would then return some JSON

I tried the following but it did not seem to return the expected result

http://tahadz.com/mishkal/ajaxGet?text=%22%D8%A7%D9%84%D8%B3%D9%84%D8%A7%D9%85%20%D8%B9%D9%84%D9%8A%D9%83%D9%85\n%D8%A7%D9%87%D9%84%D8%A7%20%D8%A8%D9%83%D9%85\n%D9%83%D9%8A%D9%81%20%D8%AD%D8%A7%D9%84%D9%83%D9%85%22&action=%22TashkeelText%22

image

2nd option:
I have no experience with python, I saw mention of a mishkal python library is that callable from C-Sharp/.NET ?

Thank you.

Web User Interface

  • إعادة تصميم الموقع ليكون ثابتا ويتواصل مع نواة التشكيل
  • إضافة إغفال الحركة الأخيرة
  • إضافة نص عشوائي مشكول للتقييم
  • إضافة خدمة البحث عن المتلازمات
  • إضافة عرض التحليل النحوي
  • إضافة وسم التلازم والتخلص من الرموز الخاصة
  • وضع روابط بين الكلمات المتصلة
  • إضافة ميزة تابع ومتبوع
  • تلوين الكلمة حسب دقة تشكيلها في التقييم
  • عرض إعراب الكلمة المختارة
  • مباعدة خطوط الاقتراحات

fix copy feature on web interface

The suggestion features can make text copy hard,
عند التقر على كلمة معينة والرغبة في النسخ، يحدث توليد للاقتراحات
مما يمنع النسخ

Problem in tanween

Hey, we are added mishkal for speech synthesis https://github.com/ARBML/klaam

from klaam import TextToSpeech

model = TextToSpeech()
model.synthesize("تشرق الشمس صباحا", apply_tshkeel=True)

However the generated tashkeel seems to add tanween on ح instead of ا

Raw Text Sequence: تُشْرِقُ الشَّمْسُ صَبَاحًا

Is that expected to happen ?

facing error on installing locally

Hi @linuxscout ,
I have cloned the repo on my ubuntu. and following the instruction to run the application
On running this cmd pip install -r ~/mishkal/requirements.txt

getting error:
Requirement already satisfied: pyarabic>=0.6.2 in /usr/local/lib/python2.7/dist-packages (from -r /root/mishkal/requirements.txt (line 1)) (0.6.10)
Requirement already satisfied: libqutrub>=1.0 in /usr/local/lib/python2.7/dist-packages (from -r /root/mishkal/requirements.txt (line 2)) (1.2.4.1)
Requirement already satisfied: naftawayh>=0.2 in /usr/local/lib/python2.7/dist-packages (from -r /root/mishkal/requirements.txt (line 3)) (0.4)
Requirement already satisfied: tashaphyne>=0.3.1 in /usr/local/lib/python2.7/dist-packages (from -r /root/mishkal/requirements.txt (line 4)) (0.3.4.1)
Requirement already satisfied: arramooz-pysqlite>=0.1 in /usr/local/lib/python2.7/dist-packages (from -r /root/mishkal/requirements.txt (line 5)) (0.3)
Requirement already satisfied: qalsadi>=0.2 in /usr/local/lib/python2.7/dist-packages (from -r /root/mishkal/requirements.txt (line 6)) (0.4.2)
Collecting mysam-tagmanager>=0.3.3 (from -r /root/mishkal/requirements.txt (line 7))
Could not find a version that satisfies the requirement mysam-tagmanager>=0.3.3 (from -r /root/mishkal/requirements.txt (line 7)) (from versions: 0.1, 0.2, 0.3, 0.3.1)
No matching distribution found for mysam-tagmanager>=0.3.3 (from -r /root/mishkal/requirements.txt (line 7))

README Instructions to Run Mishkall Webapp Do Not Work

Environment

  • Windows 11
  • Ubuntu 18

Problem

To run Mishkal as a webapp, the official README suggests: python3 interfaces/web/mishkal-webserver. However, doing so results in the following error:

entropy@ubuntu:~/Downloads/mishkal$ python3 interfaces/web/mishkal-webserver.py 
Traceback (most recent call last):
  File "interfaces/web/mishkal-webserver.py", line 45, in <module>
    test();
  File "interfaces/web/mishkal-webserver.py", line 22, in test
    from paste import httpserver
  File "interfaces/web/./lib/paste/httpserver.py", line 156
    raise exc_info[0], exc_info[1], exc_info[2]

The issue seems is that the paste library that is included in the Mishkal Github repo contains Python 2 syntax.

Attempted Solutions

  • I've downloaded the Python3 version of the paste library and swapped it with the one included in this repo. That allows the webserver to launch (no Python exceptions raised), however, when browsing to the URL http://127.0.0.1:8080, an infinite redirection occurs.
  • Alternatively, I've modified the interfaces/web/mishkal-webserver.py code to use Flask instead of Paste, and that one works much better.
  • I've tried python3 interfaces/web/mishkal_bottle.py and that one runs properly (after installing its dependencies.

Recommendation: The quickest solution for now is to update the README instructions to suggest running the mishkal_bottle.py file instead even though the bottle library is deprecated. Otherwise, the longer solution is debugging the bottle.py variation.

Tashkeel options

إضافة خيارات للتشكيل،

  • التشكيل للنطق، يمكن إقفال بعض الحركات التي لا تنطق. مثلا جاءت السيارة، لا داعي للضمة عند الوقف.
  • تشكيل مع قريبة الدقة، وضع رقم او لون يدل على الكلمات التي اختيرت بطريقة افتراضية،
  • تلوين الكلمات التي لا تعرف.
  • خيار الجمل القصيرة. وإرشاد البرنامج إلى كونها فعلية او اسمية.
  • التشكيل للإعراب.

Diacritization Evaluation System نظم تقييم التشكيل

A system to compare manual and automatic diacritisation results to evaluate the diacritization systems (Mishkal and others)
نظام لمقارنة التشكيل ما بين اليدوي والآلي، لتقييم أنظمة التشكيل الآلي مثل مشكال

تطوير أداة لتقييم التشكيل

  • أداة المقارنة وتقييم التشكيل
  • التشكيل الجزئي
  • تشكيل أواخر الكلمات فقط (الإعراب)

المعايير

معيار تشكيل الحروف:

  • عدد الحروف المشكولة/ غير المشكولة
  • عدد الحركات الصحيحة / الخاطئة
  • كل حرف غير مشكول في النتيجة يقابل ناقص حرف أما حرف مشكول

تطابق التشكيل TEXT SIMILARITY

  • تلوين الكلمات المطابقة وغير المطابقة
  • 3 درجات من التلوين: مطابق تماما، مطابق بدون إعراب، مطابق إعرابا فقط
  • كل كلمة غير مشكولة = ناقص عدد حروفها
  • تحديد حركة الإعراب: مثلُهم
  • دراسة نسبة الحركات الإعرابية في النص
  • معالجة حالة الأداة: تفضيل الأداة، إلا إذا كانت علاقة معنوية
  • المفاضلة بين الأدوات حسب ما بعدها
  • إعراب الكلمة المستبعدة

عينات التقييم

  • اختيار نصوص حديثة للمقارنة (وجدنا نصوصا في موقع الجزيرة التعليمي)
  • عينات من عصور متعددة ومجالات مختلفة
  • خيارات خاصة بتنميط التشكيل: أي توحيد تشكيل الحروف قبل حروف المدّ وتشكيل أل التعريف بنفس الطريقة
  • مقياس الرفع والتنوين

Testing Mishkal using command line

When I try to run this command to test Mishkal:

python3 mishkal/bin/mishkal-console.py -t "السلام عليكم"

I get the following error:

Traceback (most recent call last):
File "mishkal/bin/mishkal-console.py", line 349, in
test()
File "mishkal/bin/mishkal-console.py", line 236, in test
if compare and filename2 :
UnboundLocalError: local variable 'compare' referenced before assignment

I cannot find an appropriate command that would make me test Mishkal using the command line.

Newline is discarded in windows GUI application

First of all, thanks for this great work.

One issue is that new line '\n' is discarded when clicking Tashkeel. Lines and paragraphs become one paragraph.

It will be more important for large processed text files to fix this.

"codernitydb3" dependency is missing in requirements.txt

What did you do?

  • I installed mishkal
pip install mishkal
  • Then I run the example code
import mishkal.tashkeel
vocalizer = mishkal.tashkeel.TashkeelClass()
text = u"تطلع الشمس صباحا"
text = vocalizer.tashkeel(text)
print(text)

What did you expect to happen?

Getting the result ' تَطْلُعُ الشَّمْسُ صَبَاحًا'

What actually happened?

I got the following exception saying that the module codernitydb3 doesn't exist

ModuleNotFoundError: No module named 'codernitydb3'

What are your OS, Python and mishkal versions?

OS: macOS Monterey 12.1
Python: 3.9.7
mishkal: 0.4.1

Bulk diacretising

Are you interested in script file for bulk diacretising. I have finished the script in my fork. If you are interested, I could work on a pull request. Btw the script is inspired from @motazsaad

UX improving

السلام عليكم، وكان الله في عونكم - أقترح عليكم أولا تغيير مكان جملة (تطبيق مشكال متوفر في متجر غوغل) لأنها تصَعِّب نوعا ما عملية تحديد النص المشكول تحتها بحيث تندمج معه - وأقترح ثانيا أن يكون زر "تشكيل" قابلا للتشغيل عن طريق الضغط على زر الإدخال (enter) إلى جانب استعمال الفأرة - وأقترح ثالثا وأخيرا إعطاء المستعمِل إمكانية تغيير نوع وحجم الخط المستعمل - وأما فيما يخص صلب الموضوع وهو تقنية التشكيل (والثغرات عديدة جدا) فليست لدي معلومات في ذلك وإنما أدعو لكم بالتوفيق.

Migrate to flask ?

Since Oukasha web framework is stalled since 2011 would it make sense to use flask instead ?

مشكلة التقاء الساكنين

أثناء استخدامي لمشاكل وأردت أن أشكل هذه العبارة
أصبحت السيدة هدى قلقة
فإن النتيجة تكون
أَصَبِحَتْ السَّيِّدَةُ هَدَّى قَلِقَةُ
والصحيح
أَصَبَحْتِ السَّيِّدَةُ هُدَى قَلِقَةُ
حيث يحول سكون التاء إلى كسرة منعا من التقاء الساكنين
سكون التاء وسكون الحرف الأول من التشديد

تشكيل كلمة جدا

في العادة نستخدم جدا صفة بمعنى كثيرا فهي منصوبة دائما ولكن مشكال يظنها فعل مع أن الغالب عليها أنها صفة
بعد بحث في النت وجدت التالي:
إعراب: جِدًّا

جدا : مفعول مطلق لفعل محذوف تقديره : يجد جدا ، كذا في كتاب قواعد اللغة العربية لفؤاد نعمة ص : 70 .
وقيل : جدا: تحتمل وجهين :
الأوّل : صفة لمفعول مطلق محذوف
الثاني : حال بمعنى جادّا
وللعِلم ما يكون صفة لمفعول مطلق قد يصلح إعرابه حالا
وعلى كل حال هي منصوبة

global name 'word' is not defined

Hi,
when I cloned mishkal today there was a small error when running python interfaces/web/mishkal-webserver.py and calling it from a client. (I haven't updated in a long time..)

The error was easily resolved by changing "word" to "voc_word" in line 385 in tashkeel.py, but I thought you would want to know.
Thanks for the great work!

Here's the stacktrace:

exception happened during processing of request from ('127.0.0.1', 47444)
Traceback (most recent call last):
File "interfaces/web/./lib/paste/httpserver.py", line 1062, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in init
self.handle()
File "interfaces/web/./lib/paste/httpserver.py", line 436, in handle
BaseHTTPRequestHandler.handle(self)
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "interfaces/web/./lib/paste/httpserver.py", line 431, in handle_one_request
self.wsgi_execute()
File "interfaces/web/./lib/paste/httpserver.py", line 287, in wsgi_execute
self.wsgi_start_response)
File "interfaces/web/./lib/okasha2/baseWebApp.py", line 445, in call
try: r=f(rq, *a)
File "interfaces/web/./lib/okasha2/baseWebApp.py", line 236, in wrapper
r=self._template(rq, func(*args), *self._templateArgs, **self._templateKw)
File "/media/bigdisk/git/mishkal/interfaces/web/adawaty.py", line 125, in ajaxGet
resulttext=core.adaat.DoAction(text,action, options)
File "interfaces/web/../../core/adaat.py", line 40, in DoAction
return tashkeel2(text, lastmark)
File "interfaces/web/../../core/adaat.py", line 679, in tashkeel2
vocalized_dict = vocalizer.tashkeel_ouput_html_suggest(text)
File "interfaces/web/../../mishkal/tashkeel/tashkeel.py", line 413, in tashkeel_ouput_html_suggest
return self.tashkeel(text, suggestion = True, format_display = "html")
File "interfaces/web/../../mishkal/tashkeel/tashkeel.py", line 385, in tashkeel
vocalized_text = u" ".join([vocalized_text, self.display(word, format_display)])
NameError: global name 'word' is not defined

'tagMaker' object has no attribute 'encode'


AttributeError Traceback (most recent call last)
in ()
1 import mishkal.tashkeel
2 vocalizer = mishkal.tashkeel.TashkeelClass()
----> 3 vocalizer.tashkeel(u"غ")

Hello,

I'm using Mishkal for arabic language processing but this error started to occur after every calling of tashkeel function with some arabic words.
In the previous week, It was working fine, now it gives the error below.

/usr/local/lib/python3.7/dist-packages/mishkal/tashkeel.py in tashkeel(self, inputtext, suggestion, format_display)
437 # Create a special tag
438 mytagmaker = mysam.tagmaker.tagMaker()
--> 439 mytagmaker.encode(_chosen_list[i].get_tags().split(':'))
440 mytagmaker.encode(_chosen_list[i].get_type().split(':'))
441 #~ print(_chosen_list[i].get_tags().split(':'))

AttributeError: 'tagMaker' object has no attribute 'encode'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.