How to use the pyarabic.araby.DAMMA function in PyArabic

To help you get started, we’ve selected a few PyArabic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linuxscout / mishkal / mishkal / lib / qalsadi / libqutrub / mosaref_main.py View on Github external
def get_future_form(verb_vocalised, haraka = araby.FATHA):
    """
    Get The future form of a verb. for example the future form of
     qal with Damma as a Haraka of future verb, we get yqolu.
    الحصول على صيغة الفعل في المضارع، فالفعل قال، وحركة عينه في المضارع صمة، نحصل على يقول.
    @param verb_vocalised: given verb.
    @type verb_vocalised:unicode.
    @param haraka: the future mark for triverbs.
    @type haraka: unicode.
    @return: The conjugated form in the future tense.
    @rtype: unicode.
    """
    word = verb_vocalised
    transitive = True
    future_type = haraka
    if future_type not in (araby.FATHA, araby.DAMMA, araby.KASRA):
        future_type = ar_verb.get_future_type_by_name(future_type)
    vbc = classverb.VerbClass(word, transitive, future_type)
    #vb.verb_class()
    return vbc.conjugate_tense_pronoun(vconst.TenseFuture, vconst.PronounHuwa)
github linuxscout / mishkal / support / qalsadi / libqutrub / classverb.py View on Github external
self.conj_display.add(tense, vconst.PronounHuma, 
                    conj_huwa[:-2]+YEH_HAMZA+FATHA+ALEF)

                    self.conj_display.add(tense, vconst.PronounHum, 
                    conj_huwa[:-2]+YEH_HAMZA+DAMMA+WAW+ALEF)

                else :
                    self.conj_display.add(tense, vconst.PronounHya, 
                    conj_huwa+TEH+SUKUN)
                    self.conj_display.add(tense, vconst.PronounHuma_f, 
                    conj_huwa+TEH+FATHA+ALEF)
                    self.conj_display.add(tense, vconst.PronounHuma, 
                    conj_huwa+ALEF)
                    if conj_huwa.endswith(KASRA+YEH+FATHA):
                        self.conj_display.add(tense, vconst.PronounHum, 
                        conj_huwa[:-3]+DAMMA+WAW+ALEF)
                    else:
                        self.conj_display.add(tense, vconst.PronounHum, 
                        conj_huwa[:-1]+DAMMA+WAW+ALEF)
        elif tense in (vconst.TenseFuture, vconst.TensePassiveFuture, 
        vconst.TenseJussiveFuture, vconst.TenseSubjunctiveFuture, 
        vconst.TenseConfirmedFuture, vconst.TensePassiveJussiveFuture, 
        vconst.TensePassiveSubjunctiveFuture, 
        vconst.TensePassiveConfirmedFuture):

            # direct pronouns conjugations
            if pronoun in (vconst.PronounAna, vconst.PronounAnta, 
            vconst.PronounAnti, vconst.PronounAntuma, vconst.PronounAntum,
             vconst.PronounAntunna):
                conj = self.conjugate_tense_pronoun(tense, pronoun)
                self.conj_display.add(tense, pronoun, conj)
            # indirect pronouns
github linuxscout / mishkal / support / aranasyn / stemmedsynword.py View on Github external
def ajust_tanwin(self):
        """
        ajust the Tanwin case, if the word is independent from the next one.
        @return:  Nothing.
        @rtype: 
        """    
        if self.is_noun() and not self.is_stopword() and not self.is_defined()\
        and not self.has_encletic() and not self.is_mamnou3():
            #self.vocalized += '4'
            if self.vocalized.endswith(araby.DAMMA):
                self.vocalized = self.vocalized[:-1]+araby.DAMMATAN
            elif self.vocalized.endswith(araby.KASRA):
                self.vocalized = self.vocalized[:-1]+araby.KASRATAN
            elif self.vocalized.endswith(araby.TEH_MARBUTA+araby.FATHA):
                self.vocalized = self.vocalized[:-1]+araby.FATHATAN
            elif self.vocalized.endswith(araby.FATHA+araby.ALEF):
                self.vocalized = self.vocalized[:-2]+araby.FATHATAN+araby.ALEF
github linuxscout / mishkal / mishkal / lib / libqutrub / classverb.py View on Github external
letters = self.word_letters
        marks = self.word_marks
        future_letters = letters
        # حالة الفعل الثلاثي
        if self.vlength == 3:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = SUKUN + self.future_type + FATHA
            passive_future_marks = SUKUN + FATHA + FATHA
        # معالجة الفعل المثال الواوي
        #ToDO

        # الفعل الرباعي
        elif self.vlength == 4:
            first_future_mark = DAMMA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + KASRA + DAMMA
            passive_future_marks = FATHA + SUKUN + FATHA + DAMMA
        # الفعل الخماسي
        elif self.vlength == 5:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            if letters.startswith(TEH):
                future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
                passive_future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
            else :
                future_marks = FATHA + SUKUN + FATHA + KASRA + DAMMA
                passive_future_marks = FATHA + SUKUN + FATHA + FATHA + DAMMA
        #الفعل السداسي
        elif self.vlength == 6:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
github linuxscout / mishkal / support / qalsadi / libqutrub / classverb.py View on Github external
passive_future_marks = FATHA + SUKUN + FATHA + DAMMA
        # الفعل الخماسي
        elif self.vlength == 5:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            if letters.startswith(TEH):
                future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
                passive_future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
            else :
                future_marks = FATHA + SUKUN + FATHA + KASRA + DAMMA
                passive_future_marks = FATHA + SUKUN + FATHA + FATHA + DAMMA
        #الفعل السداسي
        elif self.vlength == 6:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + FATHA + SUKUN + KASRA + DAMMA
            passive_future_marks = FATHA + SUKUN + FATHA + SUKUN + FATHA + DAMMA
        # معالجة الألفات في الفعل والحركات الطويلة
        #  إذا كان طول الحركات ألأصلية للفعل 
        # أقل من طول حركات الماضي المبني للمجهول
        # هذا يعني وجود حركة طويلة
        # نقوم بتحويل الحركة الطويلة إلى ما يوافقها
        if len(marks) < len(future_marks):
            future_marks = self._homogenize_harakat(marks, future_marks)
            passive_future_marks = self._homogenize_harakat(marks, 
                     passive_future_marks)
        imp_marks = future_marks
        imp_letters = future_letters
        # حالة الأفعال التي تبدأ بألف وصل
        if letters.startswith(ALEF) or self.hamza_zaida:
            future_letters = letters[1:]
            future_marks = future_marks[1:]
github linuxscout / mishkal / mishkal / lib / libqutrub / classverb.py View on Github external
marks = self.word_marks
        future_letters = letters
        # حالة الفعل الثلاثي
        if self.vlength == 3:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = SUKUN + self.future_type + FATHA
            passive_future_marks = SUKUN + FATHA + FATHA
        # معالجة الفعل المثال الواوي
        #ToDO

        # الفعل الرباعي
        elif self.vlength == 4:
            first_future_mark = DAMMA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + KASRA + DAMMA
            passive_future_marks = FATHA + SUKUN + FATHA + DAMMA
        # الفعل الخماسي
        elif self.vlength == 5:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            if letters.startswith(TEH):
                future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
                passive_future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
            else :
                future_marks = FATHA + SUKUN + FATHA + KASRA + DAMMA
                passive_future_marks = FATHA + SUKUN + FATHA + FATHA + DAMMA
        #الفعل السداسي
        elif self.vlength == 6:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + FATHA + SUKUN + KASRA + DAMMA
github linuxscout / mishkal / support / qalsadi / libqutrub / classverb.py View on Github external
letters = self.word_letters
        marks = self.word_marks
        future_letters = letters
        # حالة الفعل الثلاثي
        if self.vlength == 3:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = SUKUN + self.future_type + FATHA
            passive_future_marks = SUKUN + FATHA + FATHA
        # معالجة الفعل المثال الواوي
        #ToDO

        # الفعل الرباعي
        elif self.vlength == 4:
            first_future_mark = DAMMA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + KASRA + DAMMA
            passive_future_marks = FATHA + SUKUN + FATHA + DAMMA
        # الفعل الخماسي
        elif self.vlength == 5:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            if letters.startswith(TEH):
                future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
                passive_future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
            else :
                future_marks = FATHA + SUKUN + FATHA + KASRA + DAMMA
                passive_future_marks = FATHA + SUKUN + FATHA + FATHA + DAMMA
        #الفعل السداسي
        elif self.vlength == 6:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
github linuxscout / mishkal / mishkal / lib / libqutrub / classverb.py View on Github external
- vconst.TenseSubjunctiveFuture : تصريف الفعل المضارع المنصوب 
            - vconst.TenseConfirmedFuture: المضارع المؤكد الثقيل
            - vconst.TensePassiveFuture :تصريف الفعل المضارع المبني للمجهول
            - vconst.TensePassiveJussiveFuture: تصريف الفعل المضارع المجزوم المني للمجهول
            - vconst.TensePassiveSubjunctiveFuture:تصريف الفعل المضارع المنصوب 
            - vconst.TensePassiveConfirmedFuture:المضارع المؤكد الثقيل المنبي للمجهول
            - vconst.TenseImperative:الفعل الامر
            - vconst.TenseConfirmedImperative: الفعل الامر المؤكد.
        """
        letters = self.word_letters
        marks = self.word_marks
        future_letters = letters
        # حالة الفعل الثلاثي
        if self.vlength == 3:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = SUKUN + self.future_type + FATHA
            passive_future_marks = SUKUN + FATHA + FATHA
        # معالجة الفعل المثال الواوي
        #ToDO

        # الفعل الرباعي
        elif self.vlength == 4:
            first_future_mark = DAMMA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + KASRA + DAMMA
            passive_future_marks = FATHA + SUKUN + FATHA + DAMMA
        # الفعل الخماسي
        elif self.vlength == 5:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            if letters.startswith(TEH):
github linuxscout / mishkal / mishkal / lib / libqutrub / classverb.py View on Github external
"""
        letters = self.word_letters
        marks = self.word_marks
        future_letters = letters
        # حالة الفعل الثلاثي
        if self.vlength == 3:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            future_marks = SUKUN + self.future_type + FATHA
            passive_future_marks = SUKUN + FATHA + FATHA
        # معالجة الفعل المثال الواوي
        #ToDO

        # الفعل الرباعي
        elif self.vlength == 4:
            first_future_mark = DAMMA
            first_passive_future_mark = DAMMA
            future_marks = FATHA + SUKUN + KASRA + DAMMA
            passive_future_marks = FATHA + SUKUN + FATHA + DAMMA
        # الفعل الخماسي
        elif self.vlength == 5:
            first_future_mark = FATHA
            first_passive_future_mark = DAMMA
            if letters.startswith(TEH):
                future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
                passive_future_marks = FATHA + FATHA + SUKUN + FATHA + DAMMA
            else :
                future_marks = FATHA + SUKUN + FATHA + KASRA + DAMMA
                passive_future_marks = FATHA + SUKUN + FATHA + FATHA + DAMMA
        #الفعل السداسي
        elif self.vlength == 6:
            first_future_mark = FATHA