You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
@@ -234,16 +237,20 @@ Roles in .lu file format can be explicitly or implicity defined.
234
237
Explicit definition follow the following notation - @ \<entityType> \<entityName> [hasRole[s]] role1, role2, ...
235
238
```markdown
236
239
> # ml entity definition with roles
240
+
237
241
@ ml name role1, role2
238
242
239
243
> this is the same as
244
+
240
245
@ ml name hasRoles role1, role2
241
246
242
247
> this is also the same as
248
+
243
249
@ ml name
244
250
@ name hasRoles role1, role2
245
251
246
252
> Also same as
253
+
247
254
@ ml name
248
255
@ name hasRole role1
249
256
@ name hasRole role2
@@ -258,6 +265,7 @@ Implicit definition: You can refer to roles directly in patterns as well as in l
258
265
- {userName=vishwac} is my name
259
266
260
267
> This definition is same as including an explicit defintion for userName with 'lastName', 'firstName' as roles
268
+
261
269
> @ ml userName hasRoles lastName, firstName
262
270
```
263
271
@@ -273,8 +281,9 @@ In patterns, you can use roles using the {\<entityName\>:\<roleName\>} notation.
273
281
You can define multiple roles for an entity in patterns and the parser will do rest!
274
282
275
283
```markdown
276
-
# BookFlight
277
284
> roles can be specified for list entity types as well - in this case fromCity and toCity are added as roles to the 'city' list entity defined further below
285
+
286
+
# BookFlight
278
287
- book flight from {city:fromCity} to {city:toCity}
279
288
- [can you] get me a flight from {city:fromCity} to {city:toCity}
280
289
- get me a flight to {city:toCity}
@@ -331,7 +340,7 @@ Here's an example of a phrase list definition:
331
340
@ phraseList Want
332
341
@ phraseList Want =
333
342
- require, need, desire, know
334
-
```
343
+
335
344
336
345
> You can also break up the phrase list values into an actual list
337
346
@@ -341,6 +350,7 @@ Here's an example of a phrase list definition:
341
350
- desire
342
351
- know
343
352
```
353
+
344
354
By default synonyms are set to be **not interchangeable** (matches with the portal experience). You can optionally set the synonyms to be **interchangeable** as part of the definition. Here's an example:
345
355
346
356
```markdown
@@ -355,26 +365,33 @@ Here's how you add a feature to a ml entity or an intent - with `usesFeature`.
@@ -393,21 +410,25 @@ Here's how you define phrase list as a feature to another model
393
410
394
411
```markdown
395
412
> phrase list definition
413
+
396
414
@ phraseList PLCity(interchangeable) =
397
415
- seattle
398
416
- space needle
399
417
- SEATAC
400
418
- SEA
401
419
402
420
> phrase list as feature to intent (also applicable to entities)
421
+
403
422
@ intent getUserProfileIntent usesFeature PLCity
404
423
405
424
> phrase list as a feature to an ml entity.
425
+
406
426
@ ml myCity usesFeature PLCity
407
427
408
428
@ regex regexZipcode = /[0-9]{5}/
409
429
410
430
> phrase list as feature to n-depth entity with phrase list as a feature
431
+
411
432
@ ml address fromAddress, toAddress
412
433
@ address =
413
434
- @ number 'door number'
@@ -474,16 +495,20 @@ Here's an example of those references:
474
495
475
496
```markdown
476
497
> You can include references to other .lu files
498
+
477
499
[All LU files](./all.lu)
478
500
479
501
> References to other files can have wildcards in them
502
+
480
503
[en-us](./en-us/*)
481
504
482
505
> References to other lu files can include sub-folders as well.
483
506
> /** indicates to the parser to recursively look for .lu files in all subfolders as well.
507
+
484
508
[all LU files](../**)
485
509
486
510
> You can include deep references to intents defined in a .lu file in utterances
511
+
487
512
# None
488
513
- [None uttearnces](./all.lu#Help)
489
514
@@ -500,12 +525,14 @@ Here's an example of those references:
500
525
> - [all.lu](./all.lu#*utterancesAndPatterns*)
501
526
502
527
> You can include wild cards with deep references to QnA maker questions defined in a .qna file in utterances
528
+
503
529
# None
504
530
- [QnA questions](./*#?)
505
531
506
532
> With the above statement, the parser will parse **all** .lu files under ./, extract out all questions from QnA pairs in those files and add them under 'None' intent as defined in this file.
507
533
508
534
> You can include deep references to QnA maker questions defined in a .qna file in utterances
0 commit comments