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 ObjectC# 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 DefaultMaximumRecognitionAlternates Retrieves the default maximum number of RecognitionAlternates to get from the recognizer. Methods
Method Description Equals Determines whether two Object instances are equal. Inherited from Object . Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. Inherited from Object . 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 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 . GetType Gets the Type of the current instance. Inherited from Object . MemberwiseClone Creates a shallow copy of the current Object . Inherited from Object . ModifyTopAlternate Modifies the RecognitionResult object with a known RecognitionAlternate object. ReferenceEquals Determines whether the specified Object instances are the same instance. Inherited from Object . 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
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