Patent Document ID: 9158742
Application ID: 13532690

Base Claim:
1. A computer-implemented method of detecting a layout of a bi-directional text, comprising using a processor of the computer for: scanning a bi-directional text to detect whether the bi-directional text contains at least one character of a predetermined shape; determining a shaping attribute for the text, responsive to a result of the scanning; using the shaping attribute to determine a text type attribute of the text, the text type attribute indicating how the text is stored; evaluating words of the text, in view of the text type attribute, to determine an orientation attribute of the text, the orientation comprising a left-to-right (“LTR”) value or a right-to-left (“RTL”) value; and associating the determined attributes with the text.

---

Claim 9:
9. The method of claim 1 , wherein the determining the orientation attribute further comprises performing, responsive to determining that the text contains no word starting with an initial letter shape and ending with a final letter shape and no word starting with the final letter shape and ending with the initial letter shape, dividing the text into a set of words and for each of the words until determining that the orientation attribute has been set, identifying a Latin word letter case of a first letter in a non-Arabic script word and the Latin letter case of a last letter in the non-Arabic script word in the text.