C H A P T E R 1 0
Recognition: Advanced Topics
10-42
Using Advanced Topics in Recognition
Note
Normally, slot values in the system's user configuration
data are set by the user from various preference slips.
It is strongly recommended that you do not change any
user preferences without first obtaining confirmation from
the user.
Modifying or Replacing the Correction Picker
10
Views that recognize text can provide an optional
ViewCorrectionPopupScript
method that modifies or replaces the picker displayed when a recognized word is
double-tapped. For more information, see "ViewCorrectionPopupScript" (page 8-75)
in Newton Programmer's Reference.
Using Stroke Bundles
10
The system provides functions that allow you to retrieve or manipulate stroke data,
such as the tablet points from each stroke. You can access these points in one of
two resolutions: screen resolution or tablet resolution. In screen resolution, each
coordinate value is rounded to the nearest screen pixel. In tablet resolution, each
coordinate has an additional three bits of data.
To access the ink in a view, use one of the functions documented in "Text and Ink
Input and Display Reference" (page 7-1) in Newton Programmer's Reference.
Functions that allow you to manipulate ink include the
ParaContainsInk
,
PolyContainsInk
, and
GetInkAt
functions.
To perform deferred recognition on the strokes in a stroke bundle, pass the stroke
bundle to one of the
Recognize
,
RecognizePara
or
RecognizePoly
functions. For more information, see "Deferred Recognition" on page 10-5.
The system software provides a number of functions for working with stroke
bundles. These functions allow you to extract information from a stroke bundle and
convert the information in stroke bundles into other forms. The stroke bundle
functions are documented in "Stroke Bundle Functions and Methods" (page 8-83)
in Newton Programmer's Reference.
Stroke Bundles Example
10
This section shows an example of working with stroke bundles before they are
passed to the view performing recognition. One way to do this, as shown in the
following code fragment, is to implement the
ViewInkWordScript
method
of an input view. The
ViewInkWordScript
method is described in
"ViewInkWordScript" (page 7-56) in Newton Programmer's Reference.