A Robust Method for Text, Line, and Word Segmentation for Historical Arabic Manuscripts