Поделиться через


RecognizerContext.Factoid - свойство

Обновлен: Ноябрь 2007

Gets or sets the string name of the factoid used by the RecognizerContext object.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Property Factoid As String
'Применение
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)

Значение свойства

Тип: System.String
The name of the factoid used by the RecognizerContext object.

Заметки

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.

ms572017.alert_note(ru-ru,VS.90).gifПримечание.

String representations of factoids are case-sensitive.

Setting the Factoid property succeeds only if the Strokes property is nullссылка null (Nothing в 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).

Примеры

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)";

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

RecognizerContext Класс

RecognizerContext - члены

Microsoft.Ink - пространство имен

RecognizerContext

Factoid

RecognizerContext.Strokes

Другие ресурсы

Using Context to Improve Accuracy