background image
C H A P T E R 9
Recognition
9-28
Using the Recognition System
the cursive recognizer's letter-by-letter option may be different from those returned
by the printed recognizer for the same input data.
Although the printed recognizer can always return non-dictionary words, it does
make extensive use of the dictionaries available to the view for recognition. Users
may improve the printed recognizer's accuracy for problematic non-dictionary
words by adding them to the user dictionary. You can supply custom dictionaries to
improve the recognition of specialized vocabulary. It is recommended that
applications do not add words to the user dictionary.
Recognizing Punctuation
9
The
vPunctuationAllowed
flag permits the cursive recognizer to return
common punctuation marks such as the period (.); comma (,); question mark (?);
single quotation marks (` and '); double quotation marks (" and "); and so on. The
printed recognizer can always return these characters, regardless of whether this
flag is set.
Views restricted to the entry of phone numbers, dates, or times need not set the
vPunctuationAllowed
flag because the
vPhoneField
,
vDateField
, and
vTimeField
flags already allow the entry of appropriate punctuation.
The cursive recognizer can also apply some simple rules when deciphering
ambiguous input; for example, it can make use of the fact that most punctuation
marks follow rather than precede words.
Suppressing Spaces Between Words
9
Setting the
vSingleUnit
flag causes the recognition system to ignore spatial
information when grouping input strokes as words; instead, the system relies on
temporal cues to determine when the user has finished writing a word. When this
flag is set, the recognizer ignores short delays, such as those that occur between
writing the individual characters in a word. Longer delays cue the recognizer to group
the most recently completed set of strokes as a word. The amount of time considered
to be a longer delay is a function of the speed of the processor and the recognition
system, as well as the value of the
timeoutCursiveOption
user preference.
The
vSingleUnit
flag is useful for views in which the presence of gratuitous
spaces may confuse the recognizer; for example, phone number entry fields usually
suppress the recognition of spaces. If you want to suppress all spaces in the displayed
text, you can use the
vNoSpaces
flag in conjunction with the
vSingleUnit
flag.
Rather than suppressing the input of spatial cues, the
vNoSpaces
flag suppresses
the insertion of spaces between groups of strokes or recognized text in views based
on the
clParagraphView
class. This post-processing flag does not restrict the
interpretation of the input strokes or affect word segmentation, as the
vSingleUnit
flag does.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна