RecognitionProperty.ConfidenceLevel 欄位
擷取用來指定 RecognitionAlternate 物件之信賴等級的全域唯一識別項 (GUID)。
命名空間: Microsoft.Ink
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
Public Shared ReadOnly ConfidenceLevel As Guid
'用途
Dim value As Guid
value = RecognitionProperty.ConfidenceLevel
public static readonly Guid ConfidenceLevel
public:
static initonly Guid ConfidenceLevel
public static final Guid ConfidenceLevel
public static final var ConfidenceLevel : Guid
欄位值
型別:System.Guid
用來指定 RecognitionAlternate 物件之信賴等級的全域唯一識別項 (GUID)。
備註
Tablet PC 應用程式發展介面 (API) 會使用 GUID 識別「封包」屬性 (Property)、辨識屬性 (Property)、「繪圖」屬性 (Attribute) 及一般「筆墨」屬性 (Property)。這些 GUID 可做為 RecognitionProperty 物件的唯讀欄位使用。您可以呼叫 GetPropertyValue 方法,使用這些 GUID 存取 RecognitionAlternate 物件的屬性。
ConfidenceLevel 會指定「辨識器」對辨識結果的信賴等級。
Microsoft® 辨識器中,只有 Microsoft 英文 (美國) 手寫辨識器和 Microsoft 筆勢辨識器支援信賴等級。協力廠商辨識器不一定支援信賴等級。
範例
在這個範例中,會將支援德文 (語言 ID 1031)、RecognizerCapabilities 功能 LinedInput 和 ConfidenceLevel 的第一個 Recognizer 指派給已選取的 Recognizer 物件變數。
Dim selectedRecognizer As Recognizer = Nothing
Dim allRecognizers As Recognizers = New Recognizers()
For Each oneReco As Recognizer In allRecognizers
' if we haven't found the one we want yet
If Not selectedRecognizer Is Nothing Then
' if supports LinedInput
If (oneReco.Capabilities And RecognizerCapabilities.LinedInput) <> 0 Then
For Each langID As Short In oneReco.Languages
' if supports German (1031)
If langID = 1031 Then
For Each propertyGuid As Guid In oneReco.SupportedProperties
' if supports ConfidenceLevel
If propertyGuid = RecognitionProperty.ConfidenceLevel Then
' assign selected
selectedRecognizer = oneReco
End If
Next
End If
Next
End If
End If
Next
Recognizer selectedRecognizer = null;
Recognizers allRecognizers = new Recognizers();
foreach (Recognizer oneReco in allRecognizers)
{
// if we haven't found the one we want yet
if (null == selectedRecognizer)
{
// if supports LinedInput
if ((oneReco.Capabilities & RecognizerCapabilities.LinedInput) != 0)
{
foreach (short langID in oneReco.Languages)
{
// if supports German (1031)
if (langID == 1031)
{
foreach (Guid propertyGuid in oneReco.SupportedProperties)
{
// if supports ConfidenceLevel
if (propertyGuid == RecognitionProperty.ConfidenceLevel)
{
// assign selected
selectedRecognizer = oneReco;
}
}
}
}
}
}
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0