SYG
- 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 structures representing nodes of symbol graph.
cSye
Number of
SYE structures in array
lpsye.
lpsyc
Pointer to corresponding array of
SYC symbol ink structures.
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 structures define the relationship between raw pen data and recognized
results. However, in version 2.0 of the Pen API they are rarely of interest to
applications for two reasons. First, API functions return recognition results without
forcing the application to deal with the complexities of raw pen data. And
second,
SYG,
SYE, and
SYC apply mainly to recognizers.
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 structure. Version 2.0 does not mandate how a recognizer should map pen data
to symbols. However, these three structures represent a viable method.
Recognizer developers writing for version 2.0 may want to use the structures or create
variations.
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, which contains a symbol string that represents the best interpretation from
the symbol graph.
SYE and
SYC structures work together with the
HPENDATA memory block to identify strokes and meanings for ink. The following table
lists the basic functions of these structures.
Structure
| Description
|
HPENDATA
| Contains raw data information: strokes, pen up, pen down, points, and so on.
|
SYC
| A symbol character map. SYC structures delimit strokes in an HPENDATA. A single shape can be identified
by one or more SYC structures. Each SYC identifies a starting stroke, an ending stroke, a starting point, and an
ending point. A flag also indicates whether subsequent SYC structures in the array contain additional strokes for the shape. (This
feature is used for delayed strokes, such as the cross stroke of the letter "t.")
|
SYE
| A symbol element. An SYE contains a symbol, which can be a character, a gesture, or a string. The
symbol
is denoted by an SYV. The SYE contains an index into an array of SYC structures; this array identifies the
raw data that makes up the symbol. It is possible for several SYEs to use the same SYC structures. The
SYC structures contain indexes into the raw data.
|
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 and
TrainInk use this information in training.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database