RecognizerContext.Factoid Property
Gets or sets the string name of the factoid used by the RecognizerContext object.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Property Factoid As String
'Usage
Dim instance As RecognizerContext
Dim value As String
value = instance.Factoid
instance.Factoid = value
public string Factoid { get; set; }
public:
property String^ Factoid {
String^ get ();
void set (String^ value);
}
public function get Factoid () : String
public function set Factoid (value : String)
Property Value
Type: System.String
The name of the factoid used by the RecognizerContext object.
Remarks
A factoid provides context information for ink within a particular field. You specify a factoid if an input field is of a known type. For example, if the input field contains a date, specify a factoid value of "(!IS_DATE)".
If you combine the IS_DEFAULT input scope by ORing it with any other input scope, the effect is that the recognizer can return either any single expression that the default language model supports (for example, one word from the system dictionary or a date) with or without punctuation, or any value that meets the rest of the regular expression passed in to the recognizer.
To ensure the correct context association, set this property before the ink is processed for the first time.
The Factoid property takes or returns a String, not a Factoid object. For a list of possible values for the Factoid property, see the InputScope enumeration.
For more information about factoids and how to use them, see Using Context to Improve Accuracy. For a list of supported factoids, see the InputScope Enumeration.
Note
String representations of factoids are case-sensitive.
Setting the Factoid property succeeds only if the Strokes property is nulla null reference (Nothing in Visual Basic). You must set the Factoid property before you attach a Strokes collection to the Strokes property of the RecognizerContext, or you must set the Strokes property to null and then set the Factoid property (and possibly reattach the Strokes collection).
Examples
In this example, a RecognizerContext object is instantiated, and the Factoid property set to bias recognition in favor of postal code.
Dim RC As RecognizerContext = New RecognizerContext()
RC.Factoid = "(!IS_ADDRESS_POSTALCODE)"
RecognizerContext RC = new RecognizerContext();
RC.Factoid = "(!IS_ADDRESS_POSTALCODE)";
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0