다음을 통해 공유


CustomRecognizerNode.InkRecognitionConfidence 속성

업데이트: 2007년 11월

InkAnalyzer가 인식 결과의 정확도에 대해 갖는 신뢰 수준을 나타내는 값을 반환합니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink.Analysis(Microsoft.Ink.Analysis.dll)

구문

‘선언
Public ReadOnly Property InkRecognitionConfidence As InkRecognitionConfidence
‘사용 방법
Dim instance As CustomRecognizerNode
Dim value As InkRecognitionConfidence

value = instance.InkRecognitionConfidence
public InkRecognitionConfidence InkRecognitionConfidence { get; }
public:
property InkRecognitionConfidence InkRecognitionConfidence {
    InkRecognitionConfidence get ();
}
/** @property */
public InkRecognitionConfidence get_InkRecognitionConfidence()
public function get InkRecognitionConfidence () : InkRecognitionConfidence

속성 값

형식: Microsoft.Ink.InkRecognitionConfidence
InkAnalyzer 가 인식 결과의 정확도에 대해 갖는 신뢰 수준을 나타내는 값입니다.

예제

다음 예제에서는 TextBox인 selectedResultsTextBox를 사용합니다. Text 속성은 CustomRecognizerNode 개체인 customRecognizer의 GetRecognizedString에서 반환된 값으로 설정되어 있습니다. 사용자는 TextBox의 텍스트 중 일부를 선택합니다. InkRecognitionConfidence 수준이 Strong이면 선택 영역에 해당하는 Strokes가 빨간색으로 강조 표시됩니다.

' Find out what's been selected in the text box
Dim start As Integer = selectedResultsTextBox.SelectionStart
Dim length As Integer = selectedResultsTextBox.SelectionLength

' Only highlight if strong recognition
If customRecognizer.InkRecognitionConfidence = Microsoft.Ink.InkRecognitionConfidence.Strong Then
    Dim selectedNodes As ContextNodeCollection = _
        customRecognizer.GetNodesFromTextRange(start, length)

    ' Use the new start and length value to update the
    ' selection in the TextBox
    selectedResultsTextBox.SelectionStart = start
    selectedResultsTextBox.SelectionLength = length

    ' Color the strokes red if part of the selected words.
    ' Otherwise, color them black.
    Dim theStroke As Stroke
    For Each theStroke In customRecognizer.Strokes
        theStroke.DrawingAttributes = _
                    New DrawingAttributes(Color.Black)
    Next theStroke
    Dim selectedNode As ContextNode
    For Each selectedNode In selectedNodes
        For Each theStroke In selectedNode.Strokes
            theStroke.DrawingAttributes = _
                     New DrawingAttributes(Color.Red)
        Next theStroke
    Next selectedNode
End If
// Find out what's been selected in the text box
int start = selectedResultsTextBox.SelectionStart;
int length = selectedResultsTextBox.SelectionLength;

// Return if no text is selected.
if (length == 0)
    return;

// Only highlight if strong recognition
if (customRecognizer.InkRecognitionConfidence == Microsoft.Ink.InkRecognitionConfidence.Strong)
{
    ContextNodeCollection selectedNodes =
        customRecognizer.GetNodesFromTextRange(ref start, ref length);

    // Use the new start and length value to update the
    // selection in the TextBox
    selectedResultsTextBox.SelectionStart = start;
    selectedResultsTextBox.SelectionLength = length;

    // Color the strokes red if part of the selected words.
    // Otherwise, color them black.
    foreach (Stroke stroke in customRecognizer.Strokes)
    {
        stroke.DrawingAttributes =
                    new DrawingAttributes(Color.Black);
    }
    foreach (ContextNode selectedNode in selectedNodes)
    {
        foreach (Stroke stroke in selectedNode.Strokes)
        {
            stroke.DrawingAttributes =
                     new DrawingAttributes(Color.Red);
        }
    }
}

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

CustomRecognizerNode 클래스

CustomRecognizerNode 멤버

Microsoft.Ink 네임스페이스