Marqoom

Quranic terminology

The names we agreed on for Quranic terms in code, and how to use them in your project.

v0.1

Say you're building a Quran app and need a variable for the ayah number. You might call it aya_number, your colleague writes ayah_number, and another library uses verse_number. They all mean the ayah number, but now you search for three spellings to find where it's used, and you have to pick one every time you add new code.

That's the problem the terminology standard tries to solve: one name for each concept, agreed on across code, databases, and documentation. The figures below walk through the whole idea.

How did we choose the names?

The main rule: a Quranic concept keeps its Arabic name, written in Latin letters. So we write surah and ayah, not chapter and verse, even when the English word looks close, because we don't want the original Quranic concept to get lost in translation. General concepts that aren't specific to the Quran keep their usual English names, such as word, page, and letter.

Then we collected the different spellings each concept has across projects and libraries, and chose one for it, derived from how the name is said in Arabic. For example, sura, surat, and soorah all point to surah. Every rule that led us to these names, from when to keep the Arabic to how each letter is spelled, is in the naming standard. Pick a concept to see its spellings.

We collected 755 spellings, and they all point to 180 names.

What does each name mean?

A name on its own isn't enough; we also need to agree on what it describes. So every name has a dictionary entry that explains the concept, what it doesn't cover, and which concepts it connects to. Search the map for a term, or move over a point (tap it on a phone) to see its connections.

الآية

Ayahayah

A unit of the Quranic text falling within a surah and having determined boundaries.

and 18 more
Read the entry
180 concepts across 19 categories. Hover over or tap a point to see its connections, then click it, or tap it again, to read the entry. Category names open their pages.

What are registries?

Some concepts take their value from a fixed list. For example, Al-Baqarah has 285, 286, or 287 ayahs, depending on the numbering system. If you store an ayah number without its system, whoever reads your data can't tell which ayah you mean.

That's why the registries name every member of these lists: the numbering systems, the qiraat with their rawis and riwayahs, the surah names, the places of prostration, and more.

Ayah counts in the six numbering systems

An ayah number on its own isn't enough. Store its numbering system with it.

8 ayahs apart
البَقَرَة2. Baqarah285 to 287 ayahs, depending on who counts
First Madani285of 6,217
Last Madani285of 6,214
Makki285of 6,219
Kufi286of 6,236
Basri287of 6,204
Dimashqi285of 6,226
67 of the 114 surahs have more than one count. Each bar shows how far apart a surah's counts are. Move across the bars, or use the arrow keys.
The ten readers and their rawis

Each line is a riwayah: it joins a rawi to the reader he transmits from, which is where its name comes from, for example Hafs an Asim.

NafiIbn KathirAbu AmrIbn AmirAsimHamzahAl-KisaiAbu JafarYaqubKhalaf al-AshirQalunWarshAl-BazziQunbulAl-DuriAl-SusiHishamIbn DhakwanShubahHafsKhalafKhalladAbu al-HarithIbn WardanIbn JammazRuwaysRawhIshaqIdris
حَفْص عَن عَاصِمHafs an Asim
hafsthe rawianfromasimthe reader

Asim is conventionally paired with the Kufi ayah numbering: 6,236 ayahs.

Al-Duri transmits from two readers, which is why one line crosses the ring.

How do I use them in my project?

The easiest way is to add Quranic Terminology Lint to your project's pre-commit. Then every commit is checked: if you write aya_number, for example, it tells you the name we agreed on and the rule behind it.

  1. Add the hook to your project's .pre-commit-config.yaml.
  2. Run pre-commit install once. The tool needs Python 3.10 or newer.
  3. Write code as usual. If a name differs from what we agreed on, the commit stops and shows you the name to use.
.pre-commit-config.yaml
repos:
  - repo: https://github.com/marqoom-specs/quranic-terminology-lint
    rev: v0.4.0
    hooks:
      - id: quranic-terminology
pre-commit install
A finding
src/model.ts:12: error getSuraNo → getSurahNumber (rule 068: Reference numbers)

On this page