Elamur Research⌕
☰
home / papers / 2003 / T-code compression for Arabic computational morphology

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.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

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.

The paper itself, not this page. BibTeX from the library's record of the work.

@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

11 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Evan L Antworth. 1990. PC-KIMMO: a two-level processor for morphological analysis. Occasional Publications in Academic Computing, 16. find
  2. 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
  3. The Unicode Consortium, 2003. The Unicode Standard, Version 4.0, chapter 2, page 29. Addison-Wesley, Reading, MA. ISBN 0-321-18578-1. find
  4. Jeffery E. F. Friedl. 2002. Mastering Regular Expressions. O’Reilly, 2nd edition, July. find
  5. Ulrich Gunther. 1998. Robust Source Coding With Generalised T-Codes. Ph.D. thesis, University of Auckland. find
  6. 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
  7. Chanod, G. Grefenstette, and A. Schiller. 1997. Regular expressions for language engineering. In Natural Language Engineering, pages 238–305. February 5. find
  8. 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
  9. Kirubalaratnam Nithyaganesh. 1998. The Talk-Net Project Real-Time Speech Communication Using T-Codes. MSc thesis, University of Auckland. find
  10. 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
  11. Mark R Titchener. 1997. The synchronization of variable-length codes. IEEE Transactions on Information Theory, 43:683–691, March. ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/yaghi-2003-t-code-compression-arabic-computational/