All new articles from all categories

An algorithmic cheat sheet for Arabic diptotes (mamnūʿ min al-ṣarf)

In order to make sense of the immense complexity of Arabic diptotes I decided to turn all of the rules into an algorithm written in the PHP language. Diptotes (mamnūʿ min al-ṣarf) are Arabic words that do not acquire tanwīn like normal words do and have fatḥa instead of kasra in the jarr position, as in marartu bi-Aḥmada , which would normally be marartu bi-Aḥmadin if it was not a diptote).

Turning the diptote rules into an algorithm means that a grammatical discussion that normally takes about 10 pages of a grammar book is turned into a very small “function” that can be reviewed at a glance.

function is_diptote($word) {
    if(is_not_muḍāf ($word) && does_not_have_definite_al($word)) { // masājid is normally diptotate, but in masājidi l-muslimīn it is NOT diptote due to iḍāfa, likewise afḍal is normally diptote, but in marirtu bi-l-afḍal it is not due to having definite article "al"
        if(sounds_like_mafāʿil($word) || sounds_like_mafāʿīl($word)) { // masājid, ṣaḥāʾif, maṣabīḥ
            return true; // "return true" means it is a diptote
        }
        if(sounds_like_a_verb($word) && (is_proper_noun($word) || is_ṣifa($word))) { // Āhmad, Yashkur, aḥmar, ākhḍar
            return true;
        }
        if(is_maʿdūl($word)) { // maʿdūl = a word that "deviates" from its normal form, as in ʿUmar, a deviation from ʿĀmir
            if(is_proper_noun($word)) { // ʿUmar, Zuḥal, Zufar
                return true;
            }
            if(is_ṣifa($word)) { // ukhar, mathnā, thulātha, rubāʿa, khumāsa, sudāsa, subāʿa, tusāʿa, ʿushāra
                return true;
            }
        }
        if(is_feminine($word)) {
            if(is_feminine_only_in_the_way_it_sounds($word) && is_proper_noun($word)) { // Ṭalḥa, Ḥamza, Qatāda, Muʿāwiya, Khalīfa
                return true;
            }
            if(is_feminine_in_sound_and_meaning($word) && is_proper_noun($word)) { // Faṭima, ʿAʾisha, Khadīja, Munīra, Luʾluʾa, Mājida
                return true;
            }
            if(is_feminine_in_meaning_alone($word) && is_proper_noun($word)) { // Zaynab, Suʿād, Hind
                return true;
            }
            if(has_alif_taʾnīth_mamdūda($word) || has_alif_taʾnīth_maqṣūra($word)) { // ḥamrāʾ, khaḍrāʾ, ṣafrāʾ, sawdāʾ, asmāʾ, ʿuzzā, salmā, salwā, hayā, laylā, ḥublā
                return true;
            }
        }
        if(has_tarkīb_mazjī($word) && is_proper_noun($word)) { // Baʿlabak, Maʿdīkarb, Ḥaḍramawt
            return true;
        }
        if(has_added_alif_and_nūn_at_the_end($word) && (is_proper_noun($word) || is_ṣifa($word)) { // Salmān, Sulaymān, sakrān, ʿaṭshān, ghaḍbān, rayyān
            return true;
        }
        if(is_non_arabic($word) && is_proper_noun($word)) { // Jibrīl, Mīkāl, Isrāʾīl, Ibrāhīm, Ismāʿīl, Isḥāq
            return true;
        }
    }
    return false; // if above conditions are not met, it is not a diptote
}

Page 1 of 48
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48