|
77 | 77 | <format type="text/markdown"><![CDATA[
|
78 | 78 |
|
79 | 79 | ## Examples
|
80 |
| - The following example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> elements containing country/region names, any one of which may be used to recognize the containing phrase. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European countries and South American countries. Further on, the example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to group rule references to `ruleEurope` and `ruleSAmerica` into a list of two alternatives, either one of which may be used to recognize spoken input. |
| 80 | + The following example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> elements containing country/region names, any one of which may be used to recognize the containing phrase. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European and South American countries/regions. Further on, the example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to group rule references to `ruleEurope` and `ruleSAmerica` into a list of two alternatives, either one of which may be used to recognize spoken input. |
81 | 81 |
|
82 | 82 | ```
|
83 | 83 | public void WorldSoccerWinners ()
|
@@ -148,7 +148,7 @@ public void WorldSoccerWinners ()
|
148 | 148 | <format type="text/markdown"><![CDATA[
|
149 | 149 |
|
150 | 150 | ## Examples
|
151 |
| - The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. It creates a public rule named `WorldCupWinner`. It then creates two <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule> objects using <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects that contain arrays of new <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. To see the grammar that this example generates, see <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule.%23ctor%2A>. |
| 151 | + The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. It creates a public rule named `WorldCupWinner`. It then creates two <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule> objects using <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects that contain arrays of new <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. To see the grammar that this example generates, see <xref:System.Speech.Recognition.SrgsGrammar.SrgsRule.%23ctor%2A>. |
152 | 152 |
|
153 | 153 | ```csharp
|
154 | 154 | public void WorldSoccerWinners ()
|
@@ -220,7 +220,7 @@ public void WorldSoccerWinners ()
|
220 | 220 | <format type="text/markdown"><![CDATA[
|
221 | 221 |
|
222 | 222 | ## Examples
|
223 |
| - The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of acceptable country names from an array of <xref:System.String> objects. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European countries and South American countries. |
| 223 | + The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> element to build lists of acceptable country/region names from an array of <xref:System.String> objects. The example then adds one of the resulting <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> objects to their respective rules for European and South American countries/regions. |
224 | 224 |
|
225 | 225 | ```
|
226 | 226 | public void WorldSoccerWinners ()
|
@@ -288,7 +288,7 @@ public void WorldSoccerWinners ()
|
288 | 288 | <format type="text/markdown"><![CDATA[
|
289 | 289 |
|
290 | 290 | ## Examples
|
291 |
| - The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to build lists of acceptable country names from an array of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. Using the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf.Add%2A> method, the example appends an <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> that contains the string "Italy" to the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object `oneOfEurope`. |
| 291 | + The following example creates a grammar that recognizes the phrase "A nation that has won the World Cup is" followed by the name of a country/region that has won the World Cup. The example uses the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object to build lists of acceptable country/region names from an array of <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> objects. Using the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf.Add%2A> method, the example appends an <xref:System.Speech.Recognition.SrgsGrammar.SrgsItem> that contains the string "Italy" to the <xref:System.Speech.Recognition.SrgsGrammar.SrgsOneOf> object `oneOfEurope`. |
292 | 292 |
|
293 | 293 | ```
|
294 | 294 | public void WorldSoccerWinners ()
|
|
0 commit comments