C H A P T E R 1 0
Recognition: Advanced Topics
Using Advanced Topics in Recognition
Avoid including inappropriate items in the
popup, such as an ink text
item for a view that does not support ink text. It is your responsibility to ensure that
array includes only symbols representing valid choices for the
view that the
Accessing Correction Information
As words are recognized, the system saves correction information that includes
the stroke bundle. (See "Unrecognized Strokes" on page 9-7.)
alternate interpretations returned by the recognizer. (See "Classifying Strokes"
on page 9-3.)
learning data. (See "Correction and Learning" on page 9-13.)
You can call the
global function at any time to obtain
correction information for recently-recognized words. This function returns a
frame based on the
slot in the
frame holds an array of
based on the
system prototype. Each
represents a single written word.
slot in the
frame specifies the maximum number of words
for which it holds correction information. When adding a new element to the
array will cause this array to exceed the size specified by the
slot, the system
removes the first element of the
array, uses its learning data if necessary, and
adds the new
frame to the
frame provides a number of methods that you can use to
manipulate its contents; for more information, see "CorrectInfo Functions and
Methods" (page 8-54) in Newton Programmer's Reference.
frame specifies the following information:
the view that contains the word.
the position of the word within the
view that displays it.
the list of alternate interpretations of the input strokes.
an identifier specifying the recognizer that interpreted the input.
a stroke bundle (optional).
learning data (optional).
As an alternative to obtaining
frames from the
you can extract these frames from the word unit passed to an optional
method that your view provides. For a description of this
method, see "Application-Defined Recognition Methods" (page 8-66) in Newton