Bagikan melalui


RecognitionResult Class

RecognitionResult Class

Represents the result of the recognition. The results of recognizing handwritten ink are returned in a RecognitionResult object.

Definition

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

Members Table

The following table lists the members exposed by the object.

Fields

Field Description
static (Shared in Visual Basic .NET)DefaultMaximumRecognitionAlternates Retrieves the default maximum number of RecognitionAlternates to get from the recognizer.

Methods

Method Description
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.
GetAlternatesFromSelection Returns the RecognitionAlternates collection from a selection within the best result string of the RecognitionResult object, so that each RecognitionAlternate object in the collection corresponds to only one segment of ink.
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.
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.
ModifyTopAlternate Modifies the RecognitionResult object with a known RecognitionAlternate object.
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.
SetResultOnStrokes Assigns the RecognitionResult object to the Strokes collection that was used to generate the results.
ToString Returns a string that represents the TopAlternate property of the current RecognitionResult object.

Properties

Property Description
Strokes Gets the Strokes collection that was used by the recognizer to generate the RecognitionResult object.
TopAlternate Gets the top alternate of the recognition result.
TopConfidence Gets the confidence level of the TopAlternate property of the RecognitionResult object.
TopString Gets the result text for the TopAlternate property.

Inheritance Hierarchy

Object Leave Site

RecognitionResult

Remarks

RecognitionAlternate objects, or alternates, are created from the result. The best, or top, alternate is the one that is used by the default in the result. However, you can use the methods of the RecognitionResult object to specify which alternates to use in the result.

System performance can suffer if recognition results are automatically assigned to every collection of strokes. Therefore, by default, results are not attached to a collection of strokes. You must call the SetResultOnStrokes method to assign results to a collection of strokes.

The only way to persist recognition results is to call SetResultOnStrokes and then add this collection of strokes to the CustomStrokes collection on the Ink object.

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

Note: The various handwriting recognizers shipped from Microsoft in both Latin script and East Asian languages can sometimes produce the Unicode value 0xFFFF as the recognition result. This occurs when the recognizer is unable to match a piece of ink with any valid character. The 0xFFFF code point is valid UCS-2, but not allowed in UTF-8. An application that converts recognition results to UTF-8, should replace 0xFFFF with some other code point, for example, 0xFFFD.

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