RecognizedPhrase.Semantics 속성

정의

인식된 구와 연결된 의미 체계 정보를 가져옵니다.

public:
 property System::Speech::Recognition::SemanticValue ^ Semantics { System::Speech::Recognition::SemanticValue ^ get(); };
public System.Speech.Recognition.SemanticValue? Semantics { get; }
public System.Speech.Recognition.SemanticValue Semantics { get; }
member this.Semantics : System.Speech.Recognition.SemanticValue
Public ReadOnly Property Semantics As SemanticValue

속성 값

인식된 구와 연결된 의미 체계 정보입니다.

예제

다음 예제에서는 인식된 구에서 특정 의미 체계 정보를 가져오는 메서드를 정의합니다. 이 메서드가 반환될 때 의미 체계 키에 대한 값이 포함되고, 값이 검색되지 않은 경우 null이 포함됩니다. 이 메서드는 최상위 키만 확인합니다. 의미 체계 정보는 값 트리에 포함되어 있으므로 반환된 의미 체계 값을 통해 하위 수준 키에 액세스해야 합니다.

static bool TryGetSemanticValue(
      RecognizedPhrase phrase, string key, out SemanticValue value)
{
  value = null;
  bool found = phrase.Semantics.ContainsKey(key);
  if (found)
  {
    value = phrase.Semantics[key];
  }

  return found;
}

설명

음성 인식 문법에는 의미 체계 정보가 포함될 수 있습니다. 음성 인식기가 이러한 문법에 대한 인식 결과를 생성하는 경우 문법 규칙 및 인식기의 입력에 따라 의미 체계 정보가 인식 결과에 포함될 수 있습니다. 의미 체계 정보에 대한 자세한 내용은 및 SemanticResultValue 클래스를 SemanticResultKey 참조하세요.

적용 대상

추가 정보