As described in Chapter 2, no semantic interpretation is attached to mathematical content at the recognition step. AS TE R can be enhanced to recognize specialized notation and produce context-sensitive renderings (e.g., speak x2 as x squared). Some context-specific processing is needed to produce such renderings, and this section outlines the kind of information that is available: the weight of an object and special patterns.
Measure weight quantifies the complexity of math expressions. The weight function is defined as follows:
Recognizing special patterns makes renderings sound more natural. Consider how experienced readers speak math expressions. Even though is spoken as the fraction a plus b divided by c, is spoken as one half a. In addition, mathematical notation is inherently ambiguous, with the same notational construct being overloaded to mean different things in different contexts. Thus, the −1s in x−1 and sin−1x have different meanings. The recognizer treats both occurrences of the −1 as a visual attribute of the object being superscripted. The decision to treat the −1 appearing as a superscript to the function as denoting the function inverse is made by rendering rules based on special patterns.
Since such interpretation is context sensitive, the quasi-prefix representation is enhanced before an object is rendered, special-pattern (a memoized7 function) is called to identify special patterns. A user can specify additional patterns by providing method definitions on function special-pattern for specific object types. These special patterns can then be turned on by calling (turn-on-special-pattern <object-name>).
The user can provide rendering rules named <pattern> for object <object>, which get invoked when the particular special pattern is seen. Individual special patterns can be turned off by executing statement (turn-off-special-pattern <object-name>).
All special patterns can be turned off by deactivating style use-special-patterns.
Special patterns built into AS TE R include: