SemanticValue.Value Propriedade

Definição

Uma propriedade somente leitura que retorna as informações contidas no SemanticValue atual.A read-only property that returns the information contained in the current SemanticValue.

public:
 property System::Object ^ Value { System::Object ^ get(); };
public object Value { get; }
member this.Value : obj
Public ReadOnly Property Value As Object

Valor da propriedade

Object

Retorna uma Object instância que contém as informações armazenadas na SemanticValue instância atual.Returns an Object instance containing the information stored in the current SemanticValue instance.

Exemplos

O exemplo a seguir é usado para percorrer recursivamente e exibir informações (incluindo confiança) como um TreeNodeCollection , ou como os nós que formam a estrutura de árvore da semântica usada para reconhecer uma frase.The following example is used to recursively traverse and then display information (including confidence) as a TreeNodeCollection, or as the nodes making up the tree structure of the semantics used to recognize a phrase.

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

Comentários

Os resultados de reconhecimento que não fazem uso da análise semântica sempre têm um Value de null e uma Count propriedade de zero.Recognition results which do not make use of semantic parsing always have a Value of null and a Count property of zero.

Aplica-se a