background image
C H A P T E R 9
Recognition
About the Recognition System
9-3
Classifying Strokes
9
Recognition is an iterative process that compares raw input strokes with various
system-defined models to identify the best matches for further processing. When
the user writes or draws in an edit view or paragraph view that accepts user input,
the system
notifies the view that a pen event occurred within its boundaries.
provides user feedback, in the form of electronic ink drawn on the screen as the
pen moves across its surface.
attempts to group strokes meaningfully according to temporal and spatial data.
A view that accepts pen input is notified of pen events within its boundaries by
ViewClickScript
messages that are sent when the pen contacts the screen
and when it is lifted from the screen. Views based on the
clEditView
and
clParagraphView
classes handle these events automatically; other views may
not, depending on the type of view in which the pen event occurred. Your view can
supply an optional
ViewClickScript
method to take application-specific action
in response to these events as necessary.
The electronic ink displayed as the pen moves across the screen is called raw ink.
Raw ink is drawn in the same place on the screen as the original input strokes.
Views based on the
clParagraphView
view class can be configured to replace
the raw ink with another representation of the input strokes called ink text. Ink text
is a version of the original strokes that has been scaled for display and formatted
into paragraphs: spaces between groups of strokes are made uniform and groups of
strokes are wrapped to the margins of the screen. The size to which ink text is
scaled is specified by the user from the Text Editing Settings user preference slip.
This user preference slip and others that affect recognition behavior are discussed
in "User Preferences for Recognition" beginning on page 9-14.
The recognition system encapsulates raw input strokes in an object called a stroke
unit.
Stroke units cannot be examined directly from NewtonScript; however, you
can pass them to functions that construct useful objects from them or perform
recognition using the stroke data they contain.
Views configured to image input as ink text display a scaled representation of the
original input strokes without performing any further processing; that is, they
circumvent the remainder of the recognition process described here.
When stroke units are made available to a view that performs recognition, all of
the recognizers enabled for the view compete equally to classify the input. Each
recognizer compares the input to a system-defined model; if there is a match,
the recognizer involved claims the stroke unit as its own.
Once a stroke unit is claimed by one of the recognizers, it is not returned to the
other recognizers for additional classification; however, recognizers may combine
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна