Share via


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);
}
/** @property */
public String get_Factoid ()

/** @property */
public void set_Factoid (String value)
public function get Factoid () : String

public function set Factoid (value : String)
Not applicable.

Property Value

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 a 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).

Example

This C# example sets the Factoid property of the RecognizerContext object, theRecognizerContext, to the IS_ADDRESS_POSTALCODE input scope.

theRecognizerContext.Factoid = "(!IS_ADDRESS_POSTALCODE)";

This Microsoft® Visual Basic® .NET example sets the Factoid property of the RecognizerContext object, theRecognizerContext, to the IS_ADDRESS_POSTALCODE input scope.

theRecognizerContext.Factoid = "(!IS_ADDRESS_POSTALCODE)"

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

RecognizerContext Class
RecognizerContext Members
Microsoft.Ink Namespace
Factoid
RecognizerContext.Strokes

Other Resources

Using Context to Improve Accuracy