# US 2013/0159889 A1 · Obtaining Rendering Co-ordinates Of Visible Text Elements

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0159889 A1
- Document ID: US20130159889A1
- Status: Published application
- Kind: A1
- Application number: 13/808,856
- Filed: 2010-07-07
- Published: 2013-06-20
- Earliest claimed: 2010-07-07
- Inventors: Li-Wei Zheng; De-Miao Lin; Jian-Ming Lin; Suk Hwan Lim; Jian Fan; Eamonn O'Brien-Strain; Yuhong Xiong; Jerry J. Liu
- Web page: https://patentgrep.com/patent/US20130159889A1

## CPC

- G06F 3/0481: based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F 16/986: {Document structures and storage, e.g. HTML extensions}
- G06F 40/117: Tagging; Marking up (details of markup languages G06F40/143); Designating a block; Setting of attributes (style sheets, e.g. eXtensible Stylesheet Language Transformation [XSLT], G06F40/154)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method for obtaining the rendering co-ordinates of visible text elements on a web page is disclosed. The web page is represented by an input data structure comprising a plurality of text nodes, each of which represents a text element on the web page. The method comprises the following steps: a) using a computer device, wrapping each of the plurality of text nodes in a pair of mark-up language tags; b) using said computer device, obtaining the co-ordinates of a bounding rectangle for each text node using the mark-up language tags; c) using said computer device, attaching an attribute specifying the co-ordinates of the bounding rectangle to each text node; and d) using said computer device, determining whether each text node is invisible, and if it is, excluding it from an output data structure comprising the plurality of text nodes and attached attributes.

## Claims

### Claim 1

A computer-implemented method for obtaining the rendering co-ordinates of visible text elements on a web page represented by an input data structure comprising a plurality of text nodes, each of which represents a text element on the web page, the method comprising:
a) using a computer device, wrapping each of the plurality of text nodes in a pair of mark-up language tags;
b) using said computer device, obtaining the co-ordinates of a bounding rectangle for each text node using the mark-up language tags;
using said computer device, attaching an attribute specifying the co-ordinates of the bounding rectangle to each text node; and
d) using said computer device, determining whether each text node is invisible, and if it is, excluding it from an output data structure comprising the plurality of text nodes and attached attributes.

### Claim 2 (depends on 1)

A method according to claim 1, wherein the mark-up language is hypertext mark-up language (HTML) and the input data structure is a hierarchical arrangement of nodes comprising the plurality of text nodes and at least one element node representing an HTML element, each of which may have one or more of the text nodes as a lower-level neighbour in the hierarchy, and wherein step (a) comprises:
i) for each element node representing an HTML block element and having only one lower-level neighbouring text node, wrapping the lower-level neighbouring text node in a pair of HTML tags of a first type;
ii) for each element node representing an HTML block element and having more than one lower-level neighbouring text node, wrapping each such lower-level neighbouring text node in a pair of HTML tags of a second type; and
ii) for each node representing an HTML non-block element and having more than one lower-level neighbouring text node, wrapping each such lower-level neighbouring text node in a pair of HTML tags of the second type.

### Claim 3 (depends on 1)

A method according to claim 1, further comprising generating Javascript Object Notation (JSON) data defining the wrapped text nodes prior to step (b).

### Claim 4 (depends on 1)

A method according to claim 1, wherein step (a) comprises rendering the web page including the wrapped text nodes subsequent to wrapping each text node in a pair of mark-up language tags.

### Claim 5 (depends on 2)

A method according to claim 2, wherein step (a) comprises rendering the web page including the wrapped text nodes subsequent to wrapping each text node in a pair of HTML tags only if at least one text node has been wrapped in a pair of HTML tags of the second type.

### Claim 6 (depends on 2)

A method according to claim 2, further comprising attaching an attribute specifying the co-ordinates of the bounding rectangle of a higher-level neighbouring element node to each text node wrapped in a pair of HTML tags of the first type in step (c).

### Claim 7 (depends on 1)

A method according to claim 1, further comprising removing each pair of mark-up language tags after step (c).

### Claim 8 (depends on 1)

A method according to claim 1, wherein step (d) comprises determining that a text node is invisible if it has a negative value for any of the co-ordinates of its bounding rectangle.

### Claim 9 (depends on 2)

A method according to claim 2, wherein step (d) comprises determining that a text node is invisible if its bounding rectangle overlaps the bounding rectangle of a higher-level node by more than a predetermined threshold.

### Claim 10 (depends on 9)

A method according to claim 9, wherein the predetermined threshold is zero.

### Claim 11 (depends on 1)

A method according to claim 1, wherein the output data structure is in the JSON format.

### Claim 12 (depends on 1)

A method according to claim 1, wherein the pair of mark-up language tags used to wrap each text node in step (a) are HTML tags, which are undefined by the W3C HTML standards.

### Claim 13 (depends on 2)

A method according to claim 2, wherein the HTML tags of the first and second types are undefined by the W3C HTML standards.

### Claim 14

A computer program comprising a set of computer-readable instructions adapted, when executed on a computer device, to cause said computer device to obtain the rendering co-ordinates of visible text elements on a web page represented by an input data structure comprising a plurality of text nodes, each of which represents a text element on the web page, by a method comprising;
a) using said computer device, wrapping each of the plurality of text nodes in a pair of mark-up language tags;
b) using said computer device, obtaining the co-ordinates of a bounding rectangle for each text node using the mark-up language tags;
c) using said computer device, attaching an attribute specifying the co-ordinates of the bounding rectangle to each text node; and
d) using said computer device, determining whether each text node is invisible, and if it is, excluding it from an output data structure comprising the plurality of text nodes and attached attributes.

### Claim 15

A computer-readable medium having computer-executable instructions stored thereon that, if executed by a computer device, cause the computer device to obtain the rendering co-ordinates of visible text elements on a web page represented by an input data structure comprising a plurality of text nodes, each of which represents a text element on the web page, by a method comprising;
a) using said computer device, wrapping each of the plurality of text nodes in a pair of mark-up language tags;
b) using said computer device, obtaining the co-ordinates of a bounding rectangle for each text node using the mark-up language tags;
using said computer device, attaching an attribute specifying the co-ordinates of the bounding rectangle to each text node; and
d) using said computer device, determining whether each text node s invisible, and if it is, excluding it from an output data structure comprising the plurality of text nodes and attached attributes.
