background image
C H A P T E R 9
Recognition
Using the Recognition System
9-23
Obtaining Optimum Recognition Performance
9
To obtain the most accurate results from the recognition system, you must define as
precisely as possible the type of input that the view is to recognize. Aside from
potentially introducing errors, enabling superfluous recognizers may slow the
recognition system's performance.
The view flags that enable text recognition also enable dictionaries suited to
recognizing particular kinds of input, such as dates, phone numbers, and so on.
Some view flags activate multiple dictionaries, and the sets of dictionaries activated
by various flags may overlap. The system shows no preference towards any single
dictionary in a set except for a slight weighting of results in favor of words found
in the user dictionary, which most view flags enable.
The specific dictionaries that a particular flag enables varies according to the user's
locale and the ROM version of the Newton device. You usually need not be
concerned with this implementation detail, nor should you rely on the presence of a
particular dictionary when setting view flags.
When you need to control precisely which dictionaries a view uses for recognition,
you can set its
vCustomDictionaries
flag and use a
dictionaries
slot to
specify explicitly which dictionaries are to be used. For information about custom
dictionaries, see "Using Your RAM-Based Custom Dictionary" (page 10-28), in
Chapter 10, "Recognition: Advanced Topics." For information about locale and the
recognition system, see "How Locale Affects Recognition" (page 20-2), in
Chapter 20, "Localizing Newton Applications."
For best performance, you need to specify the minimum combination of recognizers
and dictionaries required to process the kind of input you expect the view to receive.
This equates to enabling the minimum set of view flags that allow the view to
recognize appropriate input correctly. By restricting the possible interpretations
returned by the recognition system to only those that are appropriate for a particular
view, you increase the system's chances of interpreting the input correctly. For
example, when configuring a view for the entry of numeric data, you would not
specify that the recognition system return alphabetic characters to that view.
The printed and cursive text recognizers appear nearly identical to NewtonScript
applications. The main difference between them is that while the cursive recognizer
can be made to use the value of the
viewFlags
slot as a strict definition of what it
can recognize, the printed recognizer uses this value as only a hint--that is, it can
always return values not specified by the input view's view flags. When configuring
views for text recognition, you should set view flags that describe the input you
anticipate the view to receive and then verify that you obtain acceptable results
from both text recognizers.
Because the printed recognizer lets you write anything in the input view, it may be
difficult to determine whether your
viewFlags
settings are appropriate when this
recognizer is enabled; the cursive recognizer usually provides better feedback in
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна