As an example, attached is a standalone (very incomplete and not verywell tested) Python script using Atspi, Wnck and Gdk via gobject-introspection
(originally based on code from Accerciser) that retrieves the word
under the mouse pointer (if any) using AT-SPI.