README
GitHubArqam

The golden book

Reference words for Arabic numbers in words (tafqeet), to test any engine in any programming language. Version 1.0.0 · 2026-11-30 · Mohsen Alyafei

Purpose

To provide the most rigorous, complete, and strictly grammar-aligned golden reference dataset for Arabic cardinal numbers (الأعداد الأصلية).

The dataset serves as an authoritative verification standard for Arabic number-to-words (tafqeet / تفقيط) libraries and engines. Any library or implementation can generate its output for the included numbers and directly compare it against the Gold Book entries to measure accuracy against high-standard Arabic grammar rules for numbers.

Any language that can read JSON

The golden book is plain JSON. There is no dependency on a specific language or runtime. A library (or a one-off script) in any of the following can load the files and compare its output against the entries:

Most common

  • JavaScript / TypeScript (Node, Deno, Bun, browser)
  • Python
  • Java
  • C# / .NET
  • Go
  • Rust
  • PHP
  • Ruby
  • Swift
  • Kotlin

Also straightforward

  • C / C++ (with a JSON library such as nlohmann/json or cJSON)
  • Dart / Flutter
  • Scala
  • Elixir / Erlang
  • Haskell
  • R
  • Julia
  • Perl
  • Lua

Practical note

The only requirement is the ability to:

  1. Parse a JSON object
  2. Iterate over the sets and number keys
  3. Compare strings

Even languages without a built-in JSON parser can use one. The golden book itself imposes no language restriction.

The files' shape

Each file holds the same 7,934 numbers in six sets, one for each gender and case: every number from 0 to 999; 1, 2, 3, 8, 10, 11, 12, 13 and 18 in every place a count can stand; the scales up to quadrillion. An entry is "number": "words", in a set named cardinal_<Male|Female>_<Raf|Nasb|Jarr>_<None|Alif|Full>_<Auto|Normal>, such as {"cardinal_Male_Nasb_Full_Auto": {"202000": "…", …}, …}. A file to test has the same shape, with any of the sets.

The conventions

RuleNoneAlifFull
tashkeelno vowel marks at all, not even the tanween: أحد عشر ألفا، ثلاثا (not أحد عشر ألفاً)no vowel marks, except the tanween of the accusative on a word that ends in aliffull: every letter carries its mark (vowel, sukun, shadda, tanween), except the alif of اثْنَانِ (hamzat al-wasl), a long vowel letter (وَاحِدٌ، عِشْرُونَ، إِحْدَى) and the silent alif of مِائَة
hundredمائة, joined to its count: ثلاثمائة، ثمانمائة (not مئة, not ثلاث مائة)مائة, joined to its count: ثلاثمائة، ثمانمائة (not مئة, not ثلاث مائة)مِائَة, its alif unmarked, joined to its count, which takes the case: ثَلَاثُمِائَةٍ، ثَلَاثَمِائَةٍ، ثَلَاثِمِائَةٍ
joiningparts joined by و with no space after it, no commas: ألف ومائتان وخمسونparts joined by و with no space after it, no commas: ألف ومائتان وخمسونparts joined by وَ with no space after it, no commas
orderlargest part first: ألف ومائة (1100), not مائة وألفlargest part first: ألف ومائة (1100), not مائة وألفlargest part first: أَلْفٌ وَمِائَةٌ (1100)
scalesألف، مليون، مليار، تريليون، كوادرليون (short scale; مليار, not بليون)ألف، مليون، مليار، تريليون، كوادرليون (short scale; مليار, not بليون)أَلْف، مِلْيُون، مِلْيَار، تِرِيلْيُون، كُوَادْرِلْيُون (short scale)
legala group of 101, 102, 201, 202 … (hundreds and then 1 or 2) writes its scale after the hundreds and again after the 1 or 2: مائة ألف وألف (101000), مائتا ألف وألفان (202000); مائة وثلاثة آلاف (103000) is unchangeda group of 101, 102, 201, 202 … (hundreds and then 1 or 2) writes its scale after the hundreds and again after the 1 or 2: مائة ألف وألف (101000), مائتا ألف وألفان (202000); مائة وثلاثة آلاف (103000) is unchangeda group of 101, 102, 201, 202 … writes its scale after the hundreds and again after the 1 or 2: مِائَةُ أَلْفٍ وَأَلْفَانِ (102000)
tanween—written on the alif: ألفاً، مليوناً (not ألفًا)written on the alif, and the letter before it takes no other mark: أَلْفاً، مِلْيُوناً (not أَلْفًا, not أَلْفَاً)
markOrder——Unicode's standard order (NFC): the vowel before the shadda: سِتَّةٌ = ت + fatha (U+064E) + shadda (U+0651)
legal (Normal files)no legal form: the hundreds and the 1 or 2 after them share one scale word: مائة وألف (101000), مائتان وألفان (202000), خمسمائة ومليونان (502000000)no legal form: the hundreds and the 1 or 2 after them share one scale word: مائة وألف (101000), مائتان وألفان (202000), خمسمائة ومليونان (502000000)no legal form: the hundreds and the 1 or 2 after them share one scale word: مِائَةٌ وَأَلْفٌ (101000), مِائَتَانِ وَأَلْفَانِ (202000), خَمْسُمِائَةٍ وَمِلْيُونَانِ (502000000)

A sample: masculine, accusative

NumberNoneAlifFullAlif · Normal
2اثنيناثنيناثْنَيْنِاثنين
8ثمانيةثمانيةثَمَانِيَةًثمانية
18ثمانية عشرثمانية عشرثَمَانِيَةَ عَشَرَثمانية عشر
300ثلاثمائةثلاثمائةثَلَاثَمِائَةٍثلاثمائة
11000أحد عشر ألفاأحد عشر ألفاًأَحَدَ عَشَرَ أَلْفاًأحد عشر ألفاً
102000مائة ألف وألفينمائة ألف وألفينمِائَةَ أَلْفٍ وَأَلْفَيْنِمائة وألفين
202000مائتي ألف وألفينمائتي ألف وألفينمِائَتَيْ أَلْفٍ وَأَلْفَيْنِمائتين وألفين

To see the words for any number, in any gender, case and tashkeel, use the Arqam page.