Term rewriting and its application to recognizing handwritten Hindu numerals

Ashraf Elnagar, Reda Alhajj, Saad Harous

Research output: Contribution to journalArticlepeer-review

2 Citations (Scopus)


In this paper the theoretical basis is presented and the implementation of a term rewriting system based on algebraic specifications is described. The input to this system is represented by an algebraic specification language, which forms not only the set of axioms but also the sorts, variables, operators and terms of a specific simulated theory or application. Rewriting and matching mechanisms provide the formal methodology for evaluating terms and proving assertions in an algebraic theory. Specifications are evaluated by interpreting terms by means of rewrite rules. The rules are described by the axioms of the specifications where the finite termination and congruence properties are assumed. A term rewriting system to recognize handwritten Hindu numerals is introduced as a case study. Besides rewriting, a robust algorithm is proposed to segment the numeral's image into strokes based on feature points and to identify cavity features. A syntactic representation (term) of the input image is matched and rewritten against a set of rules. Experimental results proved that the proposed system is tolerant to recognize a variety of numeral shapes with 96% successful recognition rate.

Original languageEnglish
Pages (from-to)271-290
Number of pages20
JournalJournal of Experimental and Theoretical Artificial Intelligence
Issue number3
Publication statusPublished - 2001
Externally publishedYes


  • Algebraic specifications
  • Handwritten recognition
  • Hindu numerals
  • Term algebra
  • Term rewriting

ASJC Scopus subject areas

  • Software
  • Theoretical Computer Science
  • Artificial Intelligence


Dive into the research topics of 'Term rewriting and its application to recognizing handwritten Hindu numerals'. Together they form a unique fingerprint.

Cite this