GrammarBuilder.DebugShowPhrases Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
tarafından GrammarBuilderkapsanan dil bilgisinin içeriğini ve yapısını gösteren bir dize alır.
public:
property System::String ^ DebugShowPhrases { System::String ^ get(); };
public string DebugShowPhrases { get; }
member this.DebugShowPhrases : string
Public ReadOnly Property DebugShowPhrases As String
Özellik Değeri
öğesinin geçerli içeriği ve yapısı GrammarBuilder.
Örnekler
Aşağıdaki örnek, en fazla dört topping içeren bir pizza sipariş etmek için bir konuşma tanıma dil bilgisi oluşturur. Dil bilgisini oluşturmadan önce durumunu konsola yazar GrammarBuilder . Bu yöntem aşağıdaki çıkışı oluşturur:
GrammarBuilder status: I would like a [cheese,mushroom,tomato,onion,anchovy,chic ken,pepperoni] and [cheese,mushroom,tomato,onion,anchovy,chicken,pepperoni] pizza
private static Grammar CreatePizzaGrammar()
{
// Create a Choices object with alternatives for toppings.
Choices toppings = new Choices(new string[] {
"cheese", "mushroom", "tomato", "onion",
"anchovy", "chicken", "pepperoni"});
// Create a GrammarBuilder and append the Choices object.
GrammarBuilder andToppings = new GrammarBuilder("and", 0, 1);
andToppings.Append(toppings);
// Construct the phrase.
GrammarBuilder gb = new GrammarBuilder("I would like a", 0, 1);
gb.Append(toppings);
gb.Append(new GrammarBuilder(andToppings, 0, 3));
gb.Append("pizza");
// Write the contents and structure of the GrammarBuilder to the console.
Console.WriteLine("Grammar content and structure: {0}", gb.DebugShowPhrases);
// Create the Grammar from the GrammarBuilder.
Grammar grammar = new Grammar(gb);
grammar.Name = "Pizza Order";
return grammar;
}
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin