SemanticValue Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SemanticValue class.
Overloads
SemanticValue(Object) |
Initializes a new instance of the SemanticValue class and specifies a semantic value. |
SemanticValue(String, Object, Single) |
Initializes a new instance of the SemanticValue class and specifies a semantic value, a key name, and a confidence level. |
Remarks
Typically, you will not create SemanticValue objects explicitly, except to support the building of strongly-typed grammars.
SemanticValue(Object)
- Source:
- SemanticValue.cs
- Source:
- SemanticValue.cs
- Source:
- SemanticValue.cs
Initializes a new instance of the SemanticValue class and specifies a semantic value.
public:
SemanticValue(System::Object ^ value);
public SemanticValue (object value);
new System.Speech.Recognition.SemanticValue : obj -> System.Speech.Recognition.SemanticValue
Public Sub New (value As Object)
Parameters
- value
- Object
The information to be stored in the SemanticValue object.
Remarks
There are no restrictions on the type of value
to be stored.
An application can retrieve value
by using the Value property on a SemanticValue instance.
The value of the Confidence property for the SemanticValue instance will be set to -1.
A SemanticValue constructed with this method cannot be referenced by key name.
Applies to
SemanticValue(String, Object, Single)
- Source:
- SemanticValue.cs
- Source:
- SemanticValue.cs
- Source:
- SemanticValue.cs
Initializes a new instance of the SemanticValue class and specifies a semantic value, a key name, and a confidence level.
public:
SemanticValue(System::String ^ keyName, System::Object ^ value, float confidence);
public SemanticValue (string keyName, object value, float confidence);
new System.Speech.Recognition.SemanticValue : string * obj * single -> System.Speech.Recognition.SemanticValue
Public Sub New (keyName As String, value As Object, confidence As Single)
Parameters
- keyName
- String
A key that can be used to reference this SemanticValue instance.
- value
- Object
An object containing information to be stored in the SemanticValue object.
- confidence
- Single
A float
containing an estimate of the certainty of semantic analysis.
Remarks
There are no restrictions on the type of value
to be stored.
An application can retrieve value
by using the Value property on a SemanticValue instance.
The confidence
parameter (returned by the Confidence property on a SemanticValue instance), should be between 0.0 and 1.0.