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.
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. 11. The method of claim 9 , wherein if the text contains no word starting with the initial letter shape and ending with the final letter shape, and contains no word starting with the final letter shape and ending with the initial letter shape, the orientation attribute is determined based on a result of searching for each of the words contained in the text, and a corresponding reversed version of the word, to determine if the word matches any word in at least one Arabic script word list.