---
title: "Discrimination between Arabic and Latin from — Haboubi 2012"
description: "The paper addresses script identification in printed pages that mix Arabic and Latin text."
authors: ["Sofiene Haboubi", "Samia Maddouri", "Hamid Amiri"]
year: 2012
venue: "arXiv:1204.1615"
source: "https://arxiv.org/abs/1204.1615"
doi: "10.1109/ccca.2011.6031496"
arxiv: "1204.1615"
licence: "CC BY 3.0 (arXiv)"
licence_url: "http://creativecommons.org/licenses/by/3.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/haboubi-2012-discrimination-between-arabic-latin-bilingual/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/haboubi-2012-discrimination-between-arabic-latin-bilingual/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2012](https://md.research.elamur.ai/free/en/papers/2012/) / Discrimination between Arabic and Latin from bilingual documents

# Discrimination between Arabic and Latin from bilingual documents

**Authors:** Sofiene Haboubi, Samia Maddouri, Hamid Amiri · **Year:** 2012 · **Venue:** arXiv:1204.1615 · **Licence:** [CC BY 3.0 (arXiv)](http://creativecommons.org/licenses/by/3.0/)

**Links:** [Publisher's page](https://doi.org/10.1109/ccca.2011.6031496) · [PDF](https://arxiv.org/pdf/1204.1615) · [DOI 10.1109/ccca.2011.6031496](https://doi.org/10.1109/ccca.2011.6031496) · [arXiv 1204.1615](https://arxiv.org/abs/1204.1615) · [OpenAlex](https://openalex.org/W2083394406)

**Citations:** 12 citations (openalex-snapshot · 2026-10-14)

## Summary
The paper addresses script identification in printed pages that mix Arabic and Latin text. This is a step that has to happen before OCR, because most recognizers expect one known language per document. The authors build a pipeline that works at the level of single words:

- Diacritic dots are stripped with an erosion followed by a dilation.
- Text lines are located through horizontal projection profiles.
- Words are cut out by dilating the image with a horizontal-line structuring element. Its length is set automatically from how the number of connected components changes as the element grows.

Each word then becomes a vector of counts of structural primitives: ascenders, descenders, upper and lower dots, loops, pieces of Arabic words (PAWs), and character-position categories, some of them crossed with position. A Multilayer Perceptron in WEKA, trained on 80% of 4229 words drawn from 57 documents, labels the held-out words with 94.32% accuracy. The result shows that cheap, interpretable shape counts can separate a cursive script from a non-cursive one inside a single page. The authors see this as a basis for later work on handwriting.

## Key points
- Data: 57 printed bilingual Arabic/Latin documents, segmented into 4229 words. The split is 80% training and 20% test, giving 846 test words (440 Arabic, 406 Latin).
- Result: 798 test words are correct and 48 wrong (94.32% accuracy, 5.68% error). Errors are lopsided: 37 Arabic words were mislabeled as Latin, against 11 Latin words mislabeled as Arabic.
- Word segmentation rule: the dilation size is taken at the first point where the standard deviation of the change in connected-component count reaches zero. This is the plateau between letters merging and whole words merging. In their measurements the gap threshold sat around 6 pixels.
- Features cover:
  - counts of PAWs and characters;
  - counts of poles H, jambs J, dots P/Q, loops B, and position classes D/M/F/I;
  - position-conditioned combinations such as HD and QF.
- Baselines split each word into zones. Pole and jamb margins are set empirically: twice the baseline gap for poles and one baseline gap for jambs.

## Interesting ideas
- Pick a segmentation threshold by sweeping a parameter and stopping at the first plateau in the count of units, between "parts merge" and "wholes merge," instead of hand-tuning it. — For Mova (tokens): the same plateau test could set cut-offs for splitting run-together or hyphenated strings, by watching how the token count reacts as the merge threshold grows.
- Describe each unit by plain counts of named structural primitives, some crossed with position (start/middle/end/isolated), so every classification can be traced back to visible properties. — For Mova (tokens): flagging foreign or code-switched words could rely on counted, position-tagged orthographic patterns instead of opaque embeddings, which keeps the decision explainable.
- Temporarily remove elements that confuse segmentation (here diacritic dots that cross line borders), segment, and only then analyze the full unit. — For Mova (tree): parentheticals or quoted insertions could be set aside while the main sentence skeleton is parsed, then reattached, reducing attachment errors they cause.
- Compare gap-distance histograms for within-unit and between-unit spacing on parallel material to find a shared boundary that works for both scripts at once. — For Mova (learn): build distribution plots on parallel or matched data to choose one threshold that serves several text genres instead of tuning each genre separately.
- Read the confusion matrix, not just accuracy: the cursive script took about three times as many errors, which points to where the features are weak. — For Mova (learn): evaluations could routinely report per-class asymmetric errors, so that repair rules target the class that is systematically misread.

*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: [Linguistics & languages](https://md.research.elamur.ai/free/en/shelves/linguistics/)

## Cite

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

```bibtex
@misc{haboubi2012discrimination,
  title = {{Discrimination between Arabic and Latin from bilingual documents}},
  author = {Haboubi, Sofiene and Maddouri, Samia and Amiri, Hamid},
  year = {2012},
  doi = {10.1109/ccca.2011.6031496},
  eprint = {1204.1615},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/ccca.2011.6031496}
}
```

- [← previous Did It Happen? The Pragmatic Complexity of Veridicality Assessment](https://md.research.elamur.ai/free/en/papers/marneffe-2012-did-it-happen-pragmatic-complexity/)
- [next → Distributional Semantics in Technicolor](https://md.research.elamur.ai/free/en/papers/bruni-2012-distributional-semantics-technicolor/)
- [↑ back to papers of 2012](https://md.research.elamur.ai/free/en/papers/2012/)

## References

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

1. A. Elbaati, M. Charfi, and A. M. Alimi, Discrimination de documents imprims arabes et latins utilisant une approche de reconnaissance, in Journes GEI, Tunisie, Mars 2004 [find](https://scholar.google.com/scholar?q=A%2E+Elbaati%2C+M%2E+Charfi%2C+and+A%2E+M%2E+Alimi%2C+Discrimination+de+documents+imprims+arabes+et+latins+utilisant+une+approche+de+reconnaissance%2C+in+Journes+GEI%2C+Tunisie%2C+Mars+2004)
2. Caesar T., J. M Gloger, E. Mandler. Processing and Feature Extraction for a Handwriting Recognition System, ICDAR, 408-411. 1993 [find](https://scholar.google.com/scholar?q=Caesar+T%2E%2C+J%2E+M+Gloger%2C+E%2E+Mandler%2E+Processing+and+Feature+Extraction+for+a+Handwriting+Recognition+System%2C+ICDAR%2C+408%2D411%2E+1993)
3. Côté M., M. Lecolinet, E. Cheriet et M. Suen. Automatic Reading of Cursive Scripts Using a Reading Model end Perceptual Concepts, International Journal on Document Analysis and Recognition, IJDAR, 1 : 3-17. 1998 [find](https://scholar.google.com/scholar?q=C%C3%B4t%C3%A9+M%2E%2C+M%2E+Lecolinet%2C+E%2E+Cheriet+et+M%2E+Suen%2E+Automatic+Reading+of+Cursive+Scripts+Using+a+Reading+Model+end+Perceptual+Concepts%2C+International+Journal+on+Document+Analysis+and+Recognition%2C+IJDAR%2C+1+%3A)
4. D. Dhanya and A. G. Ramakrishnan, “Script identification in printed bilingual documents,” in DAS ’02: Proceedings of the 5th International Workshop on Document Analysis Systems V. London, UK: Springer-Verlag, 2002, pp. 13–24. [find](https://scholar.google.com/scholar?q=D%2E+Dhanya+and+A%2E+G%2E+Ramakrishnan%2C+%E2%80%9CScript+identification+in+printed+bilingual+documents%2C%E2%80%9D+in+DAS+%E2%80%9902%3A+Proceedings+of+the+5th+International+Workshop+on+Document+Analysis+Systems+V%2E+London%2C+UK%3A+Springer)
5. H. Ma and D. Doermann, Gabor filter based multi-class classi?er for scanned document images, in ICDAR ’03: Proceedings of the Seventh International Conference on Document Analysis and Recognition. Washington, DC, USA: IEEE Computer Society, 2003, p. 968. [find](https://scholar.google.com/scholar?q=H%2E+Ma+and+D%2E+Doermann%2C+Gabor+filter+based+multi%2Dclass+classi%3Fer+for+scanned+document+images%2C+in+ICDAR+%E2%80%9903%3A+Proceedings+of+the+Seventh+International+Conference+on+Document+Analysis+and+Recognition%2E+Was)
6. Ian H. Witten, Eibe Frank. Data Mining: Practical Machine Learning Tools and Techniques (Second Edition).SBN 0-12-088407-0. 2005 [find](https://scholar.google.com/scholar?q=Ian+H%2E+Witten%2C+Eibe+Frank%2E+Data+Mining%3A+Practical+Machine+Learning+Tools+and+Techniques+%28Second+Edition%29%2ESBN+0%2D12%2D088407%2D0%2E+2005)
7. Kaouthar Bouriel, Fadoua Bouafif Samoud, Haikal El Abed, Samia Snoussi Maddouri. Stratégies d’évaluation et de comparaison de méthodes d’extraction de la ligne de base de mots manuscrits arabes. Actes du dixième Colloque International Francophone sur l’Écrit et le Document (CIFED), France, 2008. [find](https://scholar.google.com/scholar?q=Kaouthar+Bouriel%2C+Fadoua+Bouafif+Samoud%2C+Haikal+El+Abed%2C+Samia+Snoussi+Maddouri%2E+Strat%C3%A9gies+d%E2%80%99%C3%A9valuation+et+de+comparaison+de+m%C3%A9thodes+d%E2%80%99extraction+de+la+ligne+de+base+de+mots+manuscrits+arabes%2E+Actes)
8. Madhvanath S., V. Krpasundar, Pruning Large Lexicons Using Generalised Woed Shape Descriptors (1997). ICDAR, 2 : 552-555. 1997 [find](https://scholar.google.com/scholar?q=Madhvanath+S%2E%2C+V%2E+Krpasundar%2C+Pruning+Large+Lexicons+Using+Generalised+Woed+Shape+Descriptors+%281997%29%2E+ICDAR%2C+2+%3A+552%2D555%2E+1997)
9. Mark Hall, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer, Peter Reutemann, Ian H. Witten; The WEKA Data Mining Software: An Update; SIGKDD Explorations, Volume 11, Issue 1.2009 [find](https://scholar.google.com/scholar?q=Mark+Hall%2C+Eibe+Frank%2C+Geoffrey+Holmes%2C+Bernhard+Pfahringer%2C+Peter+Reutemann%2C+Ian+H%2E+Witten%3B+The+WEKA+Data+Mining+Software%3A+An+Update%3B+SIGKDD+Explorations%2C+Volume+11%2C+Issue+1%2E2009)
10. Negi A., K. S. Swaroop et A. Agarwal, A correspondence based approach to segmentation of cursive words, ICDAR, 1034-1037. 1995 [find](https://scholar.google.com/scholar?q=Negi+A%2E%2C+K%2E+S%2E+Swaroop+et+A%2E+Agarwal%2C+A+correspondence+based+approach+to+segmentation+of+cursive+words%2C+ICDAR%2C+1034%2D1037%2E+1995)
11. Pechwitz M., Märgner V., Baseline estimation for Arabic handwritten words, International Workshop on Frontiers in Handwriting Recognition (IWFHR), pp. 479–484, 2002. Weka: Data Mining Software. Weka is a collection of machine learning algorithms for data mining tasks. [http://www.cs.waikato.ac.nz/ml/weka/](http://www.cs.waikato.ac.nz/ml/weka/) [↗](http://www.cs.waikato.ac.nz/ml/weka/)
12. S. I. Jang, S. H. Jeong, and Y. S. Nam, “Classification of machine-printed and handwritten addresses on korean mail piece images using geometric features,” in ICPR ’04: Proceedings of the Pattern Recognition, 17th International Conference on (ICPR’04) Volume 2. Washington, DC, USA: IEEE Computer Society, 2004, pp. 383–386. [find](https://scholar.google.com/scholar?q=S%2E+I%2E+Jang%2C+S%2E+H%2E+Jeong%2C+and+Y%2E+S%2E+Nam%2C+%E2%80%9CClassification+of+machine%2Dprinted+and+handwritten+addresses+on+korean+mail+piece+images+using+geometric+features%2C%E2%80%9D+in+ICPR+%E2%80%9904%3A+Proceedings+of+the+Pattern+Reco)
13. S. Jaeger, H. Ma, and D. Doermann, “Identifying script onword-level with informational confidence,” in ICDAR ’05: Proceedings of theEighth International Conference on Document Analysis and Recognition. Washington, DC, USA: IEEE Computer Society, 2005, pp. 416–420. [find](https://scholar.google.com/scholar?q=S%2E+Jaeger%2C+H%2E+Ma%2C+and+D%2E+Doermann%2C+%E2%80%9CIdentifying+script+onword%2Dlevel+with+informational+confidence%2C%E2%80%9D+in+ICDAR+%E2%80%9905%3A+Proceedings+of+theEighth+International+Conference+on+Document+Analysis+and+Recognition)
14. S. Kanoun, A. Ennaji, Y. LeCourtier, and A. M. Alimi, Script and nature differentiation for arabic and latin text images, in IWFHR ’02: Proceedings of the Eighth International Workshop on Frontiers in Handwriting Recognition (IWFHR’02). Washington, DC, USA: IEEE Computer Society, 2002, p. 309. [find](https://scholar.google.com/scholar?q=S%2E+Kanoun%2C+A%2E+Ennaji%2C+Y%2E+LeCourtier%2C+and+A%2E+M%2E+Alimi%2C+Script+and+nature+differentiation+for+arabic+and+latin+text+images%2C+in+IWFHR+%E2%80%9902%3A+Proceedings+of+the+Eighth+International+Workshop+on+Frontiers+in)
15. U. Pal, S. Sinha, and B. B. Chaudhuri, “Multi-script line identification from indian documents,” in ICDAR ’03: Proceedings of the Seventh International Conference on Document Analysis and Recognition. Washington, DC, USA: IEEE Computer Society, 2003, p. 880. [find](https://scholar.google.com/scholar?q=U%2E+Pal%2C+S%2E+Sinha%2C+and+B%2E+B%2E+Chaudhuri%2C+%E2%80%9CMulti%2Dscript+line+identification+from+indian+documents%2C%E2%80%9D+in+ICDAR+%E2%80%9903%3A+Proceedings+of+the+Seventh+International+Conference+on+Document+Analysis+and+Recognition%2E)
16. W. M. Pan, C. Y. Suen, and T. D. Bui, “Script identification using steerable gabor filters,” in ICDAR ’05: Proceedings of the Eighth International Conference on Document Analysis and Recognition. Washington, DC, USA: IEEE Computer Society, 2005, pp. 883–887. [find](https://scholar.google.com/scholar?q=W%2E+M%2E+Pan%2C+C%2E+Y%2E+Suen%2C+and+T%2E+D%2E+Bui%2C+%E2%80%9CScript+identification+using+steerable+gabor+filters%2C%E2%80%9D+in+ICDAR+%E2%80%9905%3A+Proceedings+of+the+Eighth+International+Conference+on+Document+Analysis+and+Recognition%2E+Wash)
