Share via


RecognitionAlternate Class

RecognitionAlternate Class

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

Definition

Visual Basic .NET Public Class RecognitionAlternate
Inherits Object
C# public class RecognitionAlternate : Object
Managed C++ public __gc class RecognitionAlternate : public Object

Members Table

The following table lists the members exposed by the object.

Methods

Method Description
AlternatesWithConstantPropertyValues Returns a RecognitionAlternates collection that is made of a division of the RecognitionAlternate object on which this method is called.
Equals Leave Site Determines whether two Object Leave Site instances are equal. Inherited from Object Leave Site.
Finalize Leave Site Allows an Object Leave Site to attempt to free resources and perform other cleanup operations before the Object Leave Site is reclaimed by garbage collection. Inherited from Object Leave Site.
GetHashCode Leave Site Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. Inherited from Object Leave Site.
GetPropertyValue Returns the value of a specified RecognitionProperty of the RecognitionAlternate object.
GetStrokesFromStrokeRanges Returns the smallest Strokes collection that contains a known Strokes collection and for which the recognizer can provide alternates.
GetStrokesFromTextRange Returns the Strokes collection that corresponds to the smallest set of recognition segments that contains a specified character range within the alternate.
GetTextRangeFromStrokes Determines the smallest range of recognized text for which the recognizer can return an alternate that contains a known Strokes collection.
GetType Leave Site Gets the Type Leave Site of the current instance. Inherited from Object Leave Site.
MemberwiseClone Leave Site Creates a shallow copy of the current Object Leave Site. Inherited from Object Leave Site.
static (Shared in Visual Basic .NET)ReferenceEquals Leave Site Determines whether the specified Object Leave Site instances are the same instance. Inherited from Object Leave Site.
ToString Returns a string that represents the current RecognitionAlternate object.

Properties

Property Description
Ascender Gets the ascender line for a RecognitionAlternate object that represents a single line of text.
Baseline Gets the baseline for a RecognitionAlternate object that represents a single line of text.
Confidence Gets the level of confidence that a recognizer has in the recognition of a RecognitionAlternate 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 RecognitionAlternate object that represents a single line of text.
LineAlternates Gets the RecognitionAlternates 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 RecognitionAlternate object that represents a single line of text.
Strokes Gets the Strokes collection that was used by the recognizer to generate the RecognitionAlternate object.

Inheritance Hierarchy

Object Leave Site

RecognitionAlternate

Remarks

A segment is a basic ink fragment or unit that the recognizer uses internally to produce a recognition result for a known Ink 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 recognizer's 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.

Class Information

Namespace Microsoft.Ink
Assembly Microsoft.Ink (microsoft.ink.dll)
Strong Name Microsoft.Ink, Version=1.7.4009.0, Culture=neutral, PublicKeyToken=a2870d9cc4d021c8

See Also