共用方式為


IInkRecognitionAlternate Interface

IInkRecognitionAlternate Interface

Represents the possible word matches for segments of ink that are compared to a recognizers dictionary.

Members

Method Description
AlternatesWithConstantPropertyValues Returns a collection of alternates, which are a division of the alternate on which this method is called.
GetStrokesFromStrokeRanges Returns the smallest collection of strokes that contains a known input collection of strokes and for which the recognizer can provide alternates.
GetStrokesFromTextRange Returns the strokes collection that corresponds to the smallest set of that contains a specified character range within the alternate.
GetTextRangeFromStrokes Returns the smallest range of recognized text for which the recognizer can return an alternate that contains a known InkStrokes collection.
GetPropertyValue Returns the value of a specified property of the alternate. Use this to obtain property values for recogition properties that have no corresponding helper property, such as the Confidence and LineNumber properties.
Property Description
Ascender Gets the ascender line for a IInkRecognitionAlternate object that represents a single line of text.
Baseline Gets the baseline for a IInkRecognitionAlternate object that represents a single line of text.
Confidence Gets the level of confidence that a recognizer has in the recognition of a IInkRecognitionAlternate object.
ConfidenceAlternates Gets the collection of alternates where the current alternate is split into a collection of smaller alternates.
Descender Gets the descender line for a IInkRecognitionAlternate object that represents a single line of text.
LineAlternates Gets the IInkRecognitionAlternate collection in which each alternate in the collection is on a separate line.
LineNumber Gets the line number that the recognition alternate corresponds to in the recognition result.
Midline Gets the midline for a IInkRecognitionAlternate object that represents a single line of text.
String Gets the result string of the alternate.
Strokes Gets the InkStrokes collection that was used by the recognizer to generate the IInkRecognitionAlternate object.

Remarks

A segment is a basic ink fragment or unit that the recognizer uses internally to produce a recognition result for a known InkDisp object. The segments are usually determined by spacing and are broken down into the smallest possible ink fragments.

Sometimes the ink may have ambiguous distinctions between segments. These segments are compared to a recognizers dictionary to determine possible matches (alternates). When the segments are compared, the recognizer creates a list of possible alternates and assigns a confidence level to each one, picking a top choice.

For instance, consider the phrase "how are you". This phrase is probably broken into three segments (depending on the spacing between segments), one for each word.

When each segment is recognized, a RecognitionResult is created. Each result then returns a list of alternates to choose from. For instance, the segment "how" may have alternates like "how", "now", "new", and so on, with "how" being the top alternate. By default, the top alternate is returned for each segment. You can choose to return alternates other than the top alternate.

You can also return alternates that are based on the properties of the alternates, such as the confidence level of the recognition result, the line number on which the alternates appear, and so on. See the RecognitionProperty object for a list of the recognition properties.

Alternates of alternates can also be returned.

Not all recognizers set all of the properties listed above. When an application attempts to access a property that is not set by the recognizer, an argument exception is thrown.

COM Implementation

This object implements the IInkRecognitionAlternate COM interface.