This paper presents a probabilistic framework for recognizing 2D shapes, particularly handwritten Arabic characters, using a hierarchical model that combines geometric and symbolic information. It decomposes shapes into stroke primitives and applies the expectation maximization algorithm to recover stroke parameters and assign labels, resulting in an improved recognition accuracy of 97% compared to 93.2% using a global point distribution model. The methodology highlights the significance of sophisticated structural approaches for enhancing shape recognition in the field of computer vision.