Documents
What goes with the converters: the specification, the three patches, the tests, a notebook that runs the C programs, and the licence. This site describes Romenagri/ of the hindawiai/chintamani repository as it was at commit 3ad87785a75dc2b18438a8b068807103cb920c81, plus the patches below.
The specification
Romenagri/TRANSLITERATION.md is the formal definition, 1,834 lines long. The recursive-descent parser, which is the hard part, is written down in it as a grammar that a program reads and runs, and a test holds the C parser to it. Its sections:
- 1. Purpose, status, vocabulary
- 2. The three layers and the programs
- 3. The tables
- 4. ACII to Romenagri: the decoder (
acii2rmn) - 5. Romenagri to ACII: the parser (
rmn2acii) - 6. How the strings are built: the conventions
- 7. The Sanskrit additions
- 8. How to extend: the recipes
- 9. The round-trip contract
- 10. Larger character sets, character-set conflicts, missing sounds
- 11. Known limitations and quirks
- 12. Provenance and standards
- 13. Running the checks
- 14. Underscores: runs, escapes, case folding, joiners
- 15. The nukta layer (patch 0003)
- Appendix A: the complete table
- Appendix B: examples
Statements in it are of three kinds: defined (the tables, generated from the headers, and the grammar), observed (a behaviour that was measured, with the test named next to it) and cited (a fact about an outside standard, with its source).
The patches
| File | What it does |
|---|---|
patches/0001-add-missing-sanskrit-characters.patch | the twelve missing Sanskrit and Vedic characters (ACII bytes 81-8C) |
patches/0002-apply-underscore-guards.patch | the twelve guards of the parser against underscores |
patches/0003-add-nukta-layer.patch | the nukta layer of the two Unicode converters: the rule, the forms, the warning |
They apply in order to a clean Romenagri/ (patch -p1 < patches/0001-..., run in the directory that holds Romenagri/), and each has a script in tools/ that repeats its edits to the code.
The tests
tests/run_all.sh builds three trees (the unpatched one, one with patch 0001, one with all three) and runs every check against them: the table lint, the Unicode conversions, the nukta layer, the saral table, the parser against the grammar and against a hand-written parser on more than a million strings, the round trip, the corpus, the extension recipes, the limitations, the laws of the underscore, the reserved keys, the tables of the specification and an end-to-end build of Hindi programs. The exhaustive run is long, so it can be run in pieces, with --full --resume --only.
tests/run_all.sh the quick run
tests/run_all.sh --full --resume the exhaustive run, restartable
python3 tools/check_tables.py Romenagri the lint of the three tables
python3 tools/gen_doc_tables.py --check Romenagri fail if a table of the specification is out of date
The runs that were recorded for this package are in results/, with the environment they ran in.
The notebook
romenagri-explainer.ipynb runs the compiled C programs on Devanagari text and shows what each stage writes: the four stages on one word, the eleven nukta letters in three forms, the other direction, the cases C1 to C8, the warning layer and the ways of choosing the form. Nothing in it is a model. It needs Python 3, gcc, make and flex; the first cell compiles a copy of Romenagri/ in a temporary directory, or you can set ROMENAGRI_BIN to a directory of built programs. The outputs stored in it are those of the build of this site. The same file is in romenagri-site/notebooks/ of the package.
This site
The pages, the notebook and romenagri.js are generated by romenagri-site/build_site.py from the headers of Romenagri/ and from runs of the compiled programs, and --check compares the JavaScript with them.
python3 romenagri-site/build_site.py writes docs/ and notebooks/
python3 romenagri-site/build_site.py --check builds in memory and compares with the files, then compares the JavaScript
with the compiled C programs and with the Python models of tests/
It needs python3, gcc, make and flex (with -lfl); --check needs node. --cbin DIR uses the programs of a directory that is already built.
To publish it on GitHub Pages: copy the contents of romenagri-site/docs/ into a folder named docs/ at the root of the repository that is to host it, commit, and in the repository's settings, under Pages, choose “Deploy from a branch”, the branch and the /docs folder. The empty file .nojekyll tells Pages to serve the files as they are.
Sources
- The repository, hindawiai/chintamani, directory
Romenagri/: the code and the tables. - ISCII-91 (the Bureau of Indian Standards' IS 13194:1991), as the repository reproduces it in
Romenagri/iscii_map.csv: the layout of the bytes80toFF. - Apple's Mac OS Devanagari mapping, DEVANAGA.TXT, and ICU's ISCII converter, ucnvisci.cpp: two implementations of ISCII-91, compared in section 12.2 of the specification.
- Indian Script Code for Information Interchange (Wikipedia): the code chart and the codes
EFandF0. - The Unicode Standard (the Devanagari, Vedic Extensions and Devanagari Extended blocks) and UAX #15, Normalization Forms, and the Unicode Character Database's
CompositionExclusions.txt: why NFC leaves the eight letters U+0958 to U+095F decomposed. The counts in the specification were taken with theunicodedatamodule of Python 3, which carries Unicode 15.1.
Licence
Copyright © 1993-2026 Abhishek Choudhary. The code of Romenagri/ is free software under the GNU General Public License, version 2 or (at your option) any later version; the text is in the files COPYING and LICENSE of the package, and NOTICE lists what each part is and where it comes from. The new files, these pages and the scripts that build them carry SPDX-License-Identifier: GPL-2.0-or-later. The corp_* text files of Romenagri/ come from Wikipedia and keep the terms of the original articles.