SemanticValue.Confidence Vlastnost

Definice

Vrátí relativní míru jistoty jako správnost sémantické analýzy, která vrátila aktuální instanci SemanticValue .

public:
 property float Confidence { float get(); };
public float Confidence { get; }
member this.Confidence : single
Public ReadOnly Property Confidence As Single

Hodnota vlastnosti

Single

Vrátí hodnotu float , která je relativní mírou jistoty sémantické analýzy, která vrátila aktuální instanci SemanticValue .

Příklady

Následující příklad slouží k rekurzivnímu procházení a zobrazování informací (včetně spolehlivosti) jako a TreeNodeCollection jako uzlů tvořících stromovou strukturu sémantiky používané k rozpoznání fráze.

internal static void CreateSemanticsTreeNodes(  
        TreeNodeCollection nodes,  
        SemanticValue semantics,  
        String name)   
{  
  string semanticsText =   
      String.Format("  {0}  (Confidence {1})", name,semantics.Confidence);  

  // Format integers as hexadecimal.  
  if (semantics.Value == null )  
  {  
    semanticsText = semanticsText + " = null";  
  }  
  else if (semantics.Value.GetType() == typeof(int))   
  {  
    semanticsText = String.Format("{0} = {1:X} ", semanticsText, semantics.Value);  
  }   
  else   
  {  
    semanticsText = semanticsText + " = " + semantics.Value.ToString();  
  }  

  TreeNode semanticsNode = new TreeNode(semanticsText);  
  foreach (KeyValuePair<String, SemanticValue> child in semantics)   
  {  
    CreateSemanticsTreeNodes(semanticsNode.Nodes, child.Value, child.Key);  
  }  
  nodes.Add(semanticsNode);  
}  

Poznámky

SemanticValue.ConfidenceVlastnost, která vrací míru správnosti sémantické analýzy, by neměla být zaměněna s RecognizedPhrase.Confidence vlastností, která vrací míru přesnosti rozpoznávání řeči.

Platí pro