US 12,373,634 B2
Layout detection for bidirectional text documents having Hebrew text
Lina Kemmel, Maale Adumim (IL); Tomer Mahlin, Jerusalem (IL); and Gregory Brodsky, Jerusalem (IL)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on Feb. 6, 2018, as Appl. No. 15/890,159.
Prior Publication US 2019/0243878 A1, Aug. 8, 2019
Int. Cl. G06F 40/129 (2020.01); G06F 40/106 (2020.01)
CPC G06F 40/129 (2020.01) [G06F 40/106 (2020.01)] 11 Claims
OG exemplary drawing
 
1. A computer executable method for determining a layout direction for at least one electronic document containing bidirectional Hebrew text, comprising:
receiving an electronic document, the electronic document including bidirectional text wherein at least a portion of the bidirectional text includes Hebrew text;
determining if the electronic document is in plain text;
determining that the electronic document contains meaningful Hebrew words in the Hebrew text;
determining, in response to the electronic document containing meaningful Hebrew words, that the meaningful Hebrew words are not all palindromes;
detecting a character encoding for the electronic document, in response to determining that the meaningful Hebrew words are not all palindromes;
determining an ordering scheme in response to the detected character coding not being non-Unicode non-Hebrew encoding;
determining a base direction of the electronic document based at least on non-Hebrew characters present in the electronic document;
determining a character mirroring state for the electronic document based upon the determined ordering scheme and a status of a presence of at least one bracket pair in a portion of the electronic document that is to be rendered; and
rendering the electronic document based on the determined ordering scheme and the determined base direction.