Typographic Neighborhood in The Readers Project
At an early stage in the development of The Readers Project it was realized that we required a formal definition of neighborhood for a particular word or cell within the text conceived as a grid. (See: Howe & Cayley, 'The Readers Project: Procedural Agents and Literary Vectors' Leonardo 44.4 (August 2011) 317-24. abstract) We also realized at this stage that this definition was essentially typographic, dependent, for example, upon "the prior specification of a typographic arrangement of the word-cells, in particular a font at a particular font size implying a particular length of line within the 2D textual plane (and including any and all other typographic considerations)."
The following is the current formal specification of typographic neighborhood in The Readers Project.
Begin with a notional 3x3 grid of nine cells, eight of which are possible neighbors:
  
  
  
 = the current word, the live cell, the word being read.
 = the preceding word in a conventional European reading order, or if the text is treated as wrap-around, the final word of the text if the current word is its first word.
 = the next word in a conventional European reading order, or if the text is treated as wrap-around, the first word of the text if the current word is its last.
 = rightmost word on line above that typographically overlaps on the y-axis (= 'overlapping word')
or, if current word is on first line, then null,
but if current is last word in line AND boundingBox.x + width >= that of the last word on line above then = first word of current line.
 = overlapping word preceding 2, otherwise null.
 = overlapping word preceding 1, otherwise null.
 = rightmost overlapping word on line below
including the first line,
but if current is last word on line AND boundingBox.x + width >= that of the last word on line below then = first word 2 lines below wrapping to first line.
 = overlapping word preceding 8, otherwise null.
 = overlapping word preceding 7, otherwise null.
The layout of the traditional Moore neighborhood as generally employed in 'the game of life', contrasted with the typographic neighborhood for a textual grid. Note that neither 'eyes' or 'and' are included in the neighborhood due to their lack of vertical overlap (in this example) with the selected word below. The word 'others' is considered to occupy the NE neighbor position while the NW position is null.