Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 4d90f4e

Browse files
authored
remove unused dup hash in luis/qnamaker build when reconstructing files (#1026)
* remove unused dup hash and adjust test cases * fix test case * trigger tests
1 parent 208e89c commit 4d90f4e

File tree

94 files changed

+388
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+388
-388
lines changed

packages/lu/src/parser/luis/luConverter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const parseIntentsToLu = function(luisObj, luisJSON){
6666
if (luisJSON.test === true) {
6767
fileContent += `> Utterance passed in this intent: ${intent.intent.passNumber}/${intent.intent.count}` + NEWLINE
6868
}
69-
fileContent += '## ' + intent.intent.name + NEWLINE;
69+
fileContent += '# ' + intent.intent.name + NEWLINE;
7070
fileContent += parseUtterancesToLu(intent.utterances, luisJSON)
7171
fileContent += NEWLINE + NEWLINE;
7272
if (intent.intent.features) {

packages/lu/src/parser/qna/qnamaker/qnaConverter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const qnaToLuContent = function(qnaJSON){
2929
root.forEach(function(qnaItem) {
3030
fileContent += '> !# @qna.pair.source = ' + qnaItem.source + NEWLINE + NEWLINE;
3131
fileContent += qnaItem.id.toString() !== "0" ? `<a id = "${qnaItem.id}"></a>` + NEWLINE + NEWLINE : '';
32-
fileContent += '## ? ' + qnaItem.questions[0] + NEWLINE;
32+
fileContent += '# ? ' + qnaItem.questions[0] + NEWLINE;
3333
qnaItem.questions.splice(0,1);
3434
qnaItem.questions.forEach(function(question) {
3535
fileContent += '- ' + question + NEWLINE;

packages/lu/test/commands/luis/convert.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('luis:convert', () => {
113113
114114
> # Intent definitions
115115
116-
## test
116+
# test
117117
- this is a {@test=one}
118118
119119

packages/lu/test/fixtures/verified/Child_Entity_With_Spaces.lu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
> # Intent definitions
1212

13-
## CancelOrder
13+
# CancelOrder
1414
- cancel
1515
- cancel it i dont want it anymore
1616
- cancel it please
@@ -25,7 +25,7 @@
2525

2626
@ intent CancelOrder usesFeature GreetingDescriptor
2727

28-
## Confirmation
28+
# Confirmation
2929
- awesome
3030
- confirm
3131
- confirming
@@ -45,7 +45,7 @@
4545

4646
@ intent Confirmation usesFeature GreetingDescriptor
4747

48-
## Delivery
48+
# Delivery
4949
- {@Address={@Building Number=17}, {@Street=orouba street}, {@District=nasr city}, {@City=cairo}}
5050
- address is {@Address={@Building Number=675}, {@Street=gamal abd el nasser street}, {@City=giza}}
5151
- deliver it at {@Address={@Building Number=13}, {@Street=giza square}}
@@ -55,7 +55,7 @@
5555

5656
@ intent Delivery usesFeature GreetingDescriptor
5757

58-
## Greetings
58+
# Greetings
5959
- hello
6060
- hey
6161
- hey again
@@ -68,7 +68,7 @@
6868

6969
@ intent Greetings usesFeature GreetingDescriptor
7070

71-
## ModifyOrder
71+
# ModifyOrder
7272
- {@Order={@FullPizzaWithModifiers=a cheese pizza {@Size=medium} {@ToppingModifiers={@Modifier=with some} {@Topping=pineapple} and {@Topping=chicken}}}}
7373
- {@Order=add {@FullPizzaWithModifiers={@Quantity=5} {@Size=party size} {@PizzaType=marinera pizzas}} and i will pick them up at 6pm}
7474
- can i get {@Order={@FullPizzaWithModifiers={@Quantity=3} {@PizzaType=pepperoni pizzas}} and {@FullPizzaWithModifiers=a {@PizzaType=four cheese pizza}} {@SideOrder=with {@SideProduct=a large house salad} and {@SideProduct=a large fries}}}
@@ -166,7 +166,7 @@
166166

167167
@ intent ModifyOrder usesFeatures ToppingDescriptor,SizeDescriptor,QuantityDescriptor,ModifierDescriptor,ScopeDescriptor,CrustDescriptor,GreetingDescriptor
168168

169-
## None
169+
# None
170170
- deliver it at {@Address}
171171
- my address is {@Address}
172172
- address is {@Address}

packages/lu/test/fixtures/verified/LUISAppWithPAInherits.lu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
> # Intent definitions
1111

12-
## None
12+
# None
1313
- can you delete {@ToDo.TaskContent=abc} item
1414
- can you delete {@ToDo.TaskContent=todo1}
1515
- cancel {@ToDo.TaskContent=apples} from shopping list
@@ -95,7 +95,7 @@
9595

9696
> !# @intent.inherits = name : ToDo.AddToDo; domain_name : ToDo; model_name : AddToDo
9797

98-
## ToDo.AddToDo
98+
# ToDo.AddToDo
9999
- add a few items to the grocery list
100100
- add a grocery item to {@ToDo.TaskContent=buy fish}
101101
- add a grocery item to {@ToDo.TaskContent=buy fruit and vegetables}

packages/lu/test/fixtures/verified/allGen.lu

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88

99
> # Intent definitions
1010

11-
## Greeting
11+
# Greeting
1212
- Hi
1313
- Hello
1414
- Good morning
1515
- Good evening
1616

1717

18-
## Help
18+
# Help
1919
- help
2020
- I need help
2121
- please help
2222
- can you help
2323

2424

25-
## AskForUserName
25+
# AskForUserName
2626
- {@userName=vishwac}
2727
- I'm {@userName=vishwac}
2828
- call me {@userName=vishwac}
@@ -31,28 +31,28 @@
3131
- you can call me {@userName=vishwac}
3232

3333

34-
## CreateAlarm
34+
# CreateAlarm
3535
- create an alarm
3636
- create an alarm for 7AM
3737
- set an alarm for 7AM next thursday
3838

3939

40-
## DeleteAlarm
40+
# DeleteAlarm
4141
- delete the {@alarmTime} alarm
4242
- remove the {@alarmTime} alarm
4343

4444

45-
## CommunicationPreference
45+
# CommunicationPreference
4646
- set phone call as my communication preference
4747
- I prefer to receive text message
4848

4949

50-
## None
50+
# None
5151
- who is your ceo?
5252
- santa wants a blue ribbon
5353

5454

55-
## Buy chocolate
55+
# Buy chocolate
5656
- can I get some m&m
5757
- I want some twix
5858
- I would like to buy some kit kat

packages/lu/test/fixtures/verified/emptyIntentDescriptors.lu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
> # Intent definitions
1212

13-
## None
13+
# None
1414

1515

16-
## test
16+
# test
1717
- one
1818
- two
1919

packages/lu/test/fixtures/verified/luis_sorted.lu

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> # Intent definitions
1010

11-
## AskForUserName
11+
# AskForUserName
1212
- {@userName=vishwac}
1313
- I'm {@userName=vishwac}
1414
- call me {@userName=vishwac}
@@ -17,53 +17,53 @@
1717
- you can call me {@userName=vishwac}
1818

1919

20-
## Buy chocolate
20+
# Buy chocolate
2121
- can I get some m&m
2222
- I want some twix
2323
- I would like to buy some kit kat
2424

2525

26-
## CommunicationPreference
26+
# CommunicationPreference
2727
- set phone call as my communication preference
2828
- I prefer to receive text message
2929

3030

31-
## CreateAlarm
31+
# CreateAlarm
3232
- create an alarm
3333
- create an alarm for 7AM
3434
- set an alarm for 7AM next thursday
3535

3636

37-
## DeleteAlarm
37+
# DeleteAlarm
3838
- delete the {alarmTime} alarm
3939
- remove the {@alarmTime} alarm
4040

4141

42-
## Greeting
42+
# Greeting
4343
- Hi
4444
- Hello
4545
- Good morning
4646
- Good evening
4747

4848

49-
## Help
49+
# Help
5050
- help
5151
- I need help
5252
- please help
5353
- can you help
5454

5555

56-
## None
56+
# None
5757
- who is your ceo?
5858
- santa wants a blue ribbon
5959

6060

61-
## setThermostat
61+
# setThermostat
6262
- Please set {@deviceTemperature=thermostat to 72}
6363
- Set {@deviceTemperature={@customDevice=owen} to 72}
6464

6565

66-
## testIntent
66+
# testIntent
6767
- I need a flight from {@fromDate=tomorrow} and returning on {@toDate=next thursday}
6868

6969

packages/lu/test/fixtures/verified/modelAsFeatureGen.lu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
> # Intent definitions
99

10-
## test1
10+
# test1
1111
- one
1212

1313

1414
@ intent test1 usesFeature test3
1515

16-
## test2
16+
# test2
1717
- two
1818

1919

2020
@ intent test2 usesFeature simple1
2121

22-
## test3
22+
# test3
2323
- three
2424

2525

packages/lu/test/fixtures/verified/modelInfo.lu

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> # Intent definitions
1010

11-
## AskForUserName
11+
# AskForUserName
1212
- {userName=vishwac}
1313
- I'm {userName=vishwac}
1414
- call me {userName=vishwac}
@@ -17,53 +17,53 @@
1717
- you can call me {userName=vishwac}
1818

1919

20-
## Buy chocolate
20+
# Buy chocolate
2121
- I would like to buy some kit kat
2222
- I want some twix
2323
- can I get some m&m
2424

2525

26-
## CommunicationPreference
26+
# CommunicationPreference
2727
- set phone call as my communication preference
2828
- I prefer to receive text message
2929

3030

31-
## CreateAlarm
31+
# CreateAlarm
3232
- create an alarm for 7AM
3333
- create an alarm
3434
- set an alarm for 7AM next thursday
3535

3636

37-
## DeleteAlarm
37+
# DeleteAlarm
3838
- delete the {alarmTime} alarm
3939
- remove the {alarmTime} alarm
4040

4141

42-
## Greeting
42+
# Greeting
4343
- Hi
4444
- Good morning
4545
- Good evening
4646
- Hello
4747

4848

49-
## Help
49+
# Help
5050
- can you help
5151
- please help
5252
- I need help
5353
- help
5454

5555

56-
## None
56+
# None
5757
- who is your ceo?
5858
- santa wants a blue ribbon
5959

6060

61-
## setThermostat
61+
# setThermostat
6262
- Please set {deviceTemperature=thermostat to 72}
6363
- Set {deviceTemperature={customDevice=owen} to 72}
6464

6565

66-
## testIntent
66+
# testIntent
6767
- I need a flight from {datetimeV2:fromDate=tomorrow} and returning on {datetimeV2:toDate=next thursday}
6868

6969

0 commit comments

Comments
 (0)