QariAI Arabic Roots
v0.5.5Read-only Quranic Arabic Corpus morphology, root counts and root drills for all 6,236 verses.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
lookup_root_or_word Look up a root or word
Look up one Arabic root or word in the QariAI vocabulary catalog (139 roots, 799 headwords; separate from the corpus data), optionally with a surah:ayah reference. Returns the matching root entry, headword or verified verse token, or a status for an unsupported word–verse pair, conflicting vowel marks, ambiguous matches or no catalog match. Verse readings are returned only for verified word–verse pairs.
| Parameter | Type | Description |
|---|---|---|
query * | string | Arabic root or word to look up, 1-80 characters, Arabic script only. Vowel marks and tatweel are optional; a root may be written with spaces. Examples: "ك ت ب" (root), "يسبحون" (word). |
verse | string | Optional Quran verse reference as surah:ayah, each part 1-3 digits. Example: "21:33". When omitted, the lookup is against the catalog only; when given, a verse token is returned only for verified word… |
get_root_drill Start an Arabic root drill
Return three multiple-choice questions for one Arabic root in the QariAI catalog. Call it when a learner wants to practise a root. Creates no server-side session or saved progress.
| Parameter | Type | Description |
|---|---|---|
root * | string | Arabic root letters, 1-24 characters, Arabic script only. Spaces, vowel marks and tatweel are ignored, so "ك ت ب" and "كتب" are the same root. Example: "ك ت ب". Only roots in the QariAI catal… |
check_root_answer Check a root drill answer
Grade one numbered choice (1-3) for a question from a drill returned by get_root_drill. Returns whether the choice is correct, the correct answer, and, after question 3, an optional final_message with a link to further QariAI material.
| Parameter | Type | Description |
|---|---|---|
choice * | integer | Number of the chosen answer option, an integer from 1 to 3. Example: 1. |
question * | integer | Number of the drill question being answered, an integer from 1 to 3. Example: 2. |
root * | string | Arabic root letters, 1-24 characters, Arabic script only. Spaces, vowel marks and tatweel are ignored, so "ك ت ب" and "كتب" are the same root. Example: "ك ت ب". The root of the drill being an… |
score_so_far | integer | Number of earlier questions in this drill answered correctly (0-2), used to compute the running score. Optional; when omitted, no score is returned. Example: 1. |
get_verse_morphology Get verse morphology
Return the word-by-word morphology of one Quran verse from the Quranic Arabic Corpus: for every word, its segments with tag, lemma, root and grammatical features. Covers all 6,236 verses. Lemmas and roots are derived from the corpus’s Buckwalter source. Contains no Quran text and no translation. Call it when the grammar or roots of a specific verse are needed.
| Parameter | Type | Description |
|---|---|---|
ayah * | integer | Ayah (verse) number within the surah, an integer from 1 to 286 (surah 2, the longest, has 286 verses). Example: 255. |
surah * | integer | Surah (chapter) number, an integer from 1 to 114. Example: 2. |
find_verses_by_root Find verses by root
List where an Arabic root occurs in the Quran according to the Quranic Arabic Corpus: total count, lemma breakdown and a page of occurrences (verse, word number, lemma, tag), paged with limit and offset; next_offset is returned when more remain. Counts cover the whole Quran. Lemmas and roots are derived from the corpus’s Buckwalter source. Contains no Quran text and no translation. Call it when the usage or frequency of a root is needed.
| Parameter | Type | Description |
|---|---|---|
root * | string | Arabic root letters, 1-24 characters, Arabic script only. Spaces, vowel marks and tatweel are ignored, so "ك ت ب" and "كتب" are the same root. Example: "ك ت ب". Hamza and alif variants are tr… |
limit | integer | Maximum number of occurrences returned in this page, an integer from 1 to 100. Defaults to 50. Example: 20. |
offset | integer | Number of occurrences to skip, an integer of 0 or more. Defaults to 0. The next page starts at the next_offset value returned by the previous result. Example: 50. |