SYG
1.0 2.0
A symbol
graph, which represents the possible interpretations identified by the
recognizer.
typedef struct {
POINT
rgpntHotSpots[MAXHOTSPOT];
int
cHotSpot;
int nFirstBox;
LONG
lRecogVal;
LPSYE
lpsye;
int cSye;
LPSYC
lpsyc;
int cSyc;
SYV syv;
LONG
lRecogVal;
CL cl;
int iSyc;
UINT
wStrokeFirst;
UINT
wPntFirst;
UINT
wStrokeLast;
UINT
wPntLast;
BOOL
fLastSyc;
} SYG;
Members
rgpntHotSpots[MAXHOTSPOT]
Hot spots of
the symbol (if any). MAXHOTSPOT is defined as 8.
cHotSpot
Number of
valid hot spots in rgpntHotSpots.
nFirstBox
Row-major
index to box of first character in result.
lRecogVal
Reserved.
lpsye
Pointer to
array of SYE
cSye
Number of SYE
structures in array lpsye.
lpsyc
Pointer to
corresponding array of SYC
cSyc
Number of SYC
structures in symbol graph.
Comments
All indexes
are zero-based.
If a single
entity recognized by the recognizer is mapped to a string of several symbol
values, the recognizer creates multiple SYE . This is the case for recognizers that can
recognize highly stylized sequences of characters for example, ing in which the individual characters are not necessarily
recognized.
The nFirstBox
member has no meaning for gestures. A gesture is applied to the location
indicated by its hot spot.
The SYG,
SYE, and SYC
All
nontrivial recognizers should somehow track the pen strokes that form each
character in the returned results. To be compatible with version 1.0, a
recognizer must use the SYG, SYE , and SYC structures and return a symbol
graph an SYG structure as a member of the RCRESULT
The following
information applies to version 1.0 applications and recognizers, and to version
2.0 recognizers that employ symbol graphs to relate strokes to recognized
symbols. For further information about SYG, SYE, and SYC , see Returning Results in
Chapter 8, Writing a Recognizer.
A symbol
graph is a representation of the possible interpretations identified by the
recognizer. The RC Manager processes the symbol graph using the dictionary path
to identify the best interpretation. This best interpretation is returned in
the results message along with the symbol graph.
A symbol
value is a 32-bit value that represents a glyph (such as a character or a
gesture) recognized by a recognizer. This is sometimes referred to as a symbol.
A symbol string is an array of symbols terminated with SYV_NULL.
Each element
of the symbol graph, an SYE ,
contains information about the recognized character for example, bounding rectangle and hot spots. The SYC
structure maps SYE structures back to the corresponding raw data. If two
or more consecutive SYE structures map to the same SYC, they
represent an indivisible unit. For example, the user might teach the system of th with the
crossbar of the t connected to
the h. SYC
structures are used primarily for training.
A version 1.0
application generally does not use the symbol graph directly. Instead, it uses
the hSyv member of RCRESULT
Structure |
Description |
HPENDATA |
Contains
raw data information: strokes, pen up, pen down, points, and so on. |
SYC |
A symbol
character map. SYC |
SYE |
A symbol
element. An SYE |
SYV |
A symbol
value. |
SYG |
A symbol
graph. |
A set of SYEs
and SYCs, together with an HPENDATA structure, is sufficient to
define ink and specify how that ink should be interpreted. The training
functions TrainContext