T-code compression for Arabic computational morphology
Paper · 2003 · Jim Yaghi, Mark R. Titchener and Sane Yagi
Summary
Arabic builds words by fitting consonantal roots into templates and then adding inflectional affixes. Because of this, exact-match tools such as spell checkers, search engines and indexers work badly, and a full list of word forms becomes very large. The authors take a generate-then-look-up approach. A rule-driven generator, written as Perl regular expressions, produces every inflected verb form together with its root, template and affix identifiers, about 2 million words in total. The forms are stored in a dictionary indexed by their undiacritised spelling. The dictionary is compressed with T-Codes, a self-synchronising subclass of Huffman-style variable-length codes, and gets a compact per-entry layout that allows fast scanning. The result is an 8 MB dictionary that includes its search information. That is more than 90% smaller than an uncompressed disk B-Tree, and lookup speed stays comparable. A small web CGI uses the dictionary to extract roots and parse words. The authors also propose sending words between devices as coded ID triples. This matters because analysis becomes a cheap, exact lookup into an enumerated and explainable form space.
Key points
- The Word Data Creator Environment (WCE) is a GUI for editing the MainDictionary Table (root, root class, pattern, variant) and the Templates Table (tense/voice template, transformation rules, affix list).
- The Word Generation Engine (WGE) runs three stages in sequence:
- Stem Transformer applies ordered regex rules one pass at a time.
- Affixer builds 17 morphosyntactic forms per stem.
- Slotter places the radicals into the F/M/L/R position markers.
- Coverage is verbs only, about 2 million generated forms. Each entry stores numeric root, template and affix IDs so the fully diacritised word can be regenerated.
- Each entry starts with a 12-bit field giving the skip distance to the next entry with a different prefix, plus a 4-bit field counting letters shared with the next word. The final dictionary is 8 MB.
- Worked example: yaktubwna = {12,884, 460, 30} takes 18 bits as T-Codes versus 48 bits as raw 16-bit integers. A T-Code finite-state decoder that reads whole bytes is planned to make decoding faster.
Interesting ideas
- I1. Instead of analysing words by reversing rules, enumerate every surface form from lexicon plus rules, tag each with its generating IDs, and make analysis a lookup that returns all matching parses.
- I2. Represent a word as a small tuple (root, template, affix) and regenerate the surface form on demand, with variable-length codes assigned by corpus frequency of each ID.
- I3. Index entries under a normalised key (here the word with diacritics removed), then filter candidates by whatever extra detail the query actually supplies.
- I4. Apply transformation rules strictly one per pass in a fixed order, feeding each output into the next rule, with a tool to preview the result after any edit.
- I5. Strip candidate affix combinations from longest to shortest, push every stripped variant into a queue, and look all of them up, keeping every successful parse.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): The en crate could precompile a lemma × paradigm form table in which every form carries its lemma and rule ID, so each analysis is an exact, explainable lookup rather than a guess.
- I2 (back): The text → graph → text compressor could encode tokens as (lemma, inflection-feature) IDs with frequency-based codes and rely on the generator to restore the exact spelling.
- I3 (tokens): Lexicon lookups could key on case-folded, apostrophe- and hyphen-normalised forms, then rerank by the original spelling, so noisy input still hits the right entries.
- I4 (learn): Self-induced repair rules could run as an ordered pipeline that logs each intermediate state, which makes it easy to see which rule broke a tree.
- I5 (tokens): Clitic and contraction splitting ('s, n't, -ly derivations) could generate several segmentation candidates checked against the form table, passing ambiguity on to the parser instead of committing early.
Fields, topics and concepts
📚 Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksComputer Vision and Pattern Recognition · 2,869 works
🧭 Topics 3Research subjects and languages the work is about.Semitic languages · 2,908 worksMorphology · 405 worksEfficient models & compression · 242 works
Cite
Cite as Jim Yaghi, Mark R. Titchener and Sane Yagi. 2003. T-code compression for Arabic computational morphology. Proceedings of the Australasian Language Technology Workshop 2003.
@inproceedings{yaghi2003t,
title = {{T-code compression for Arabic computational morphology}},
author = {Jim Yaghi, Mark R. Titchener and Sane Yagi},
booktitle = {Proceedings of the Australasian Language Technology Workshop 2003},
year = {2003},
url = {https://aclanthology.org/U03-1010/}
}References
- Evan L Antworth. 1990. PC-KIMMO: a two-level processor for morphological analysis. Occasional Publications in Academic Computing, 16. find
- Kenneth R Beesley. 2001. Finite-state morphological analysis and generation of arabic at xerox research: Status and plans in 2001. In ARABIC Language Processing: Status and Prospects. Arabic NLP Workshop at ACL/EACL 2001, July. find
- The Unicode Consortium, 2003. The Unicode Standard, Version 4.0, chapter 2, page 29. Addison-Wesley, Reading, MA. ISBN 0-321-18578-1. find
- Jeffery E. F. Friedl. 2002. Mastering Regular Expressions. O’Reilly, 2nd edition, July. find
- Ulrich Gunther. 1998. Robust Source Coding With Generalised T-Codes. Ph.D. thesis, University of Auckland. find
- Lauri Karttunen and Kenneth R Beesley. 1992. Two-level rule compiler. Technical Report ISTL-92-2, Xerox, Xerox Palo Alto Research Center, Palo Alto, California. L. Karttunen, J-P. find
- Chanod, G. Grefenstette, and A. Schiller. 1997. Regular expressions for language engineering. In Natural Language Engineering, pages 238–305. February 5. find
- Lauri Karttunen. 1993. Finite-state lexicon compiler. Technical Report ISTL-NLTT-1993-04-02, Xerox, Xerox Palo Alto Research Center, Palo Alto, California, April. find
- Kirubalaratnam Nithyaganesh. 1998. The Talk-Net Project Real-Time Speech Communication Using T-Codes. MSc thesis, University of Auckland. find
- Mark R Titchener. 1984. Digital encoding by means of new t-codes to provide improved data synchronization and message integrity. In Technical Note, IEE Proceedings, volume 131 of 4, pages 51–53, July. find
- Mark R Titchener. 1997. The synchronization of variable-length codes. IEEE Transactions on Information Theory, 43:683–691, March. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/yaghi-2003-t-code-compression-arabic-computational/