Skip to content

Commit b3af88e

Browse files
committed
acrolinx
1 parent b34c194 commit b3af88e

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

articles/ai-services/speech-service/includes/how-to/intent-recognition/cpp/pattern-matching.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Now create an `IntentRecognizer`. Insert this code right below your Speech confi
5050
## Add some intents
5151

5252
You need to associate some patterns with a `PatternMatchingModel` and apply it to the `IntentRecognizer`.
53-
We will start by creating a `PatternMatchingModel` and adding a few intents to it. A PatternMatchingIntent is a struct so we will just use the in-line syntax.
53+
We'll start by creating a `PatternMatchingModel` and adding a few intents to it. A PatternMatchingIntent is a struct so we just use the in-line syntax.
5454

5555
> [!Note]
5656
> We can add multiple patterns to a `PatternMatchingIntent`.
@@ -64,15 +64,15 @@ model->Intents.push_back({"{action} the door."}, "OpenCloseDoor");
6464
6565
## Add some custom entities
6666
67-
To take full advantage of the pattern matcher you can customize your entities. We will make "floorName" a list of the available floors.
67+
To take full advantage of the pattern matcher, you can customize your entities. We'll make "floorName" a list of the available floors.
6868
6969
```cpp
7070
model->Entities.push_back({ "floorName" , Intent::EntityType::List, Intent::EntityMatchMode::Strict, {"one", "1", "two", "2", "lobby", "ground floor"} });
7171
```
7272

7373
## Apply our model to the Recognizer
7474

75-
Now it is necessary to apply the model to the `IntentRecognizer`. It is possible to use multiple models at once so the API takes a collection of models.
75+
Now it's necessary to apply the model to the `IntentRecognizer`. It's possible to use multiple models at once so the API takes a collection of models.
7676

7777
```cpp
7878
std::vector<std::shared_ptr<LanguageUnderstandingModel>> collection;
@@ -94,7 +94,7 @@ auto result = intentRecognizer->RecognizeOnceAsync().get();
9494

9595
## Display the recognition results (or errors)
9696

97-
When the recognition result is returned by the Speech service, we will print the result.
97+
When the Speech service returns the recognition result, we print the result.
9898

9999
Insert this code below `auto result = intentRecognizer->RecognizeOnceAsync().get();`:
100100

@@ -250,7 +250,7 @@ Now you're ready to build your app and test our speech recognition using the Spe
250250

251251
1. **Compile the code** - From the menu bar of Visual Studio, choose **Build** > **Build Solution**.
252252
2. **Start your app** - From the menu bar, choose **Debug** > **Start Debugging** or press <kbd>F5</kbd>.
253-
3. **Start recognition** - It will prompt you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
253+
3. **Start recognition** - It prompts you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
254254

255255
For example if you say "Take me to floor 2", this should be the output:
256256

@@ -269,4 +269,4 @@ RECOGNIZED: Text = Take me to floor 7.
269269
NO INTENT RECOGNIZED!
270270
```
271271

272-
The Intent ID is empty because 7 was not in our list.
272+
The Intent ID is empty because 7 wasn't in our list.

articles/ai-services/speech-service/includes/how-to/intent-recognition/cpp/simple-pattern-matching.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Now create an `IntentRecognizer`. Insert this code right below your Speech confi
5050
## Add some intents
5151

5252
You need to associate some patterns with the `IntentRecognizer` by calling `AddIntent()`.
53-
We will add 2 intents with the same ID for changing floors, and another intent with a separate ID for opening and closing doors.
53+
We'll add two intents with the same ID for changing floors, and another intent with a separate ID for opening and closing doors.
5454

5555
```cpp
5656
intentRecognizer->AddIntent("Take me to floor {floorName}.", "ChangeFloors");
@@ -59,7 +59,7 @@ We will add 2 intents with the same ID for changing floors, and another intent w
5959
```
6060
6161
> [!NOTE]
62-
> There is no limit to the number of entities you can declare, but they will be loosely matched. If you add a phrase like "{action} door" it will match any time there is text before the word "door". Intents are evaluated based on their number of entities. If two patterns would match, the one with more defined entities is returned.
62+
> There's no limit to the number of entities you can declare, but they'll be loosely matched. If you add a phrase like "{action} door", it matches any time there's text before the word "door". Intents are evaluated based on their number of entities. If two patterns would match, the one with more defined entities is returned.
6363
6464
## Recognize an intent
6565
@@ -74,7 +74,7 @@ Insert this code below your intents:
7474

7575
## Display the recognition results (or errors)
7676

77-
When the recognition result is returned by the Speech service, we will print the result.
77+
When the Speech service returns the recognition result, we print the result.
7878

7979
Insert this code below `auto result = intentRecognizer->RecognizeOnceAsync().get();`:
8080

@@ -221,7 +221,7 @@ Now you're ready to build your app and test our speech recognition using the Spe
221221

222222
1. **Compile the code** - From the menu bar of Visual Studio, choose **Build** > **Build Solution**.
223223
2. **Start your app** - From the menu bar, choose **Debug** > **Start Debugging** or press <kbd>F5</kbd>.
224-
3. **Start recognition** - It will prompt you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
224+
3. **Start recognition** - It prompts you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
225225

226226
For example if you say "Take me to floor 7", this should be the output:
227227

articles/ai-services/speech-service/includes/how-to/intent-recognition/csharp/pattern-matching.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ using (var recognizer = new IntentRecognizer(config))
6161
## Add some intents
6262

6363
You need to associate some patterns with a `PatternMatchingModel` and apply it to the `IntentRecognizer`.
64-
We will start by creating a `PatternMatchingModel` and adding a few intents to it.
64+
We'll start by creating a `PatternMatchingModel` and adding a few intents to it.
6565

6666
> [!Note]
6767
> We can add multiple patterns to a `PatternMatchingIntent`.
@@ -92,7 +92,7 @@ model.Intents.Add(new PatternMatchingIntent("DoorControl", "{action} the doors",
9292

9393
## Add some custom entities
9494

95-
To take full advantage of the pattern matcher you can customize your entities. We will make "floorName" a list of the available floors. We will also make "parkingLevel" an integer entity.
95+
To take full advantage of the pattern matcher, you can customize your entities. We'll make "floorName" a list of the available floors. We'll also make "parkingLevel" an integer entity.
9696

9797
Insert this code below your intents:
9898

@@ -108,7 +108,7 @@ model.Entities.Add(PatternMatchingEntity.CreateIntegerEntity("parkingLevel"));
108108

109109
## Apply our model to the Recognizer
110110

111-
Now it is necessary to apply the model to the `IntentRecognizer`. It is possible to use multiple models at once so the API takes a collection of models.
111+
Now it's necessary to apply the model to the `IntentRecognizer`. It's possible to use multiple models at once so the API takes a collection of models.
112112

113113
Insert this code below your entities:
114114

@@ -133,7 +133,7 @@ var result = await recognizer.RecognizeOnceAsync();
133133

134134
## Display the recognition results (or errors)
135135

136-
When the recognition result is returned by the Speech service, we will print the result.
136+
When the Speech service returns the recognition result, we print the result.
137137

138138
Insert this code below `var result = await recognizer.RecognizeOnceAsync();`:
139139

@@ -334,7 +334,7 @@ Now you're ready to build your app and test our speech recognition using the Spe
334334

335335
1. **Compile the code** - From the menu bar of Visual Studio, choose **Build** > **Build Solution**.
336336
2. **Start your app** - From the menu bar, choose **Debug** > **Start Debugging** or press <kbd>F5</kbd>.
337-
3. **Start recognition** - It will prompt you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
337+
3. **Start recognition** - It prompts you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
338338

339339
For example if you say "Take me to floor 2", this should be the output:
340340

@@ -353,4 +353,4 @@ RECOGNIZED: Text=Take me to floor 7.
353353
Intent not recognized.
354354
```
355355

356-
No intent was recognized because 7 was not in our list of valid values for floorName.
356+
No intent was recognized because 7 wasn't in our list of valid values for floorName.

articles/ai-services/speech-service/includes/how-to/intent-recognition/csharp/simple-pattern-matching.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ using (var intentRecognizer = new IntentRecognizer(config))
6161
## Add some intents
6262

6363
You need to associate some patterns with the `IntentRecognizer` by calling `AddIntent()`.
64-
We will add 2 intents with the same ID for changing floors, and another intent with a separate ID for opening and closing doors.
64+
We'll add two intents with the same ID for changing floors, and another intent with a separate ID for opening and closing doors.
6565
Insert this code inside the `using` block:
6666

6767
```C#
@@ -71,7 +71,7 @@ intentRecognizer.AddIntent("{action} the door.", "OpenCloseDoor");
7171
```
7272

7373
> [!NOTE]
74-
> There is no limit to the number of entities you can declare, but they will be loosely matched. If you add a phrase like "{action} door" it will match any time there is text before the word "door". Intents are evaluated based on their number of entities. If two patterns would match, the one with more defined entities is returned.
74+
> There's no limit to the number of entities you can declare, but they'll be loosely matched. If you add a phrase like "{action} door", it matches any time there's text before the word "door". Intents are evaluated based on their number of entities. If two patterns would match, the one with more defined entities is returned.
7575
7676
## Recognize an intent
7777

@@ -87,7 +87,7 @@ var result = await intentRecognizer.RecognizeOnceAsync();
8787

8888
## Display the recognition results (or errors)
8989

90-
When the recognition result is returned by the Speech service, we will print the result.
90+
When the Speech service returns the recognition result, we print the result.
9191

9292
Insert this code below `var result = await recognizer.RecognizeOnceAsync();`:
9393

@@ -255,7 +255,7 @@ Now you're ready to build your app and test our speech recognition using the Spe
255255

256256
1. **Compile the code** - From the menu bar of Visual Studio, choose **Build** > **Build Solution**.
257257
2. **Start your app** - From the menu bar, choose **Debug** > **Start Debugging** or press <kbd>F5</kbd>.
258-
3. **Start recognition** - It will prompt you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
258+
3. **Start recognition** - It prompts you to say something. The default language is English. Your speech is sent to the Speech service, transcribed as text, and rendered in the console.
259259

260260
For example if you say "Take me to floor 7", this should be the output:
261261

0 commit comments

Comments
 (0)