background image
C H A P T E R 1 0
Recognition: Advanced Topics
About Advanced Topics in Recognition
10-3
On the other hand, if the view does not supply a
recConfig
frame, the recognition
system builds one based on the set of view flags enabled for that view, the contents
of its
dictionaries
slot (if present) and any recognition-related user preferences
that may apply. Thus, every view that performs recognition is eventually associated
with a
recConfig
frame that the system uses to perform setup tasks when the
view is opened.
Note that the
recConfig
frame actually used to configure recognition is the one
that the system builds, not the one that you supply. The
recConfig
frame that
you supply is referenced by the
_proto
slot of the
recConfig
frame that the
system builds.
The
recConfig
frame built by the system is passed to a recognition area, which is
an object used internally by the system to describe the recognition characteristics
of one or more views. Because similar views can share an area, the use of
recognition areas minimizes the reconfiguration of the recognition system required
to respond to changes in views on the screen.
A small number of recognition areas are kept in a cache. You can change the
recognition behavior of a view dynamically by specifying new recognition settings
and invalidating the area cache. The next time the view accepts input, the system
builds a new recognition area reflecting its currently-specified recognition behavior
and the dictionaries it is to use for recognition.
In addition to providing an efficient and flexible means of configuring the
recognition system programmatically,
recConfig
frames provide support for
future expansion of the recognition system. The
recConfig
frame allows
applications to specify recognition configurations in a uniform way that is not
dependent on the use of any particular recognizer engine. Although the Newton
platform currently supports only its built-in recognizers, future versions of the
system may permit the use of third-party recognizer engines.
The system provides several standard
recConfig
frames that can be placed in your
view's
recConfig
slot or used as a starting point for building your own
recConfig
frames. For descriptions of system-supplied
recConfig
frames, see
"System-Supplied recConfig Frames" (page 8-18) in Newton Programmer's
Reference
.
In summary, the recognition behavior that a view exhibits is ultimately determined
by a combination of the following values:
values inherited from the system's user configuration data.
values in the view's
viewFlags
and
entryFlags
slots.
values in the view's
dictionaries
slot when the
vCustomDictionaries
flag is set.
values specified by an optional
recToggle
view, which may override values
inherited from user configuration data or supply additional values.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна