Skip to content

Commit

Permalink
Fix builtin construction cache (#484)
Browse files Browse the repository at this point in the history
It contains a construction that is too generalize that take any input as
the artist name for `playArtist` action
  • Loading branch information
curtisman authored Dec 12, 2024
1 parent 10dfb42 commit 4caac70
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 176 deletions.
150 changes: 74 additions & 76 deletions ts/packages/dispatcher/data/explainer/v5/constructions.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@
},
{
"matches": [
"pause the music"
"the music",
"the song",
"the track",
"the audio"
],
"basename": "M:action",
"namespace": "player.pause::fullActionName",
"basename": "object",
"canBeMerged": false,
"index": 3
},
Expand All @@ -54,9 +56,9 @@
{
"matches": [
"nocturne",
"prelude",
"etude",
"ballade"
"fur elise",
"moonlight sonata",
"clair de lune"
],
"basename": "M:trackName",
"namespace": "player::parameters.trackName",
Expand All @@ -76,7 +78,7 @@
"chopin",
"beethoven",
"mozart",
"bach"
"debussy"
],
"basename": "M:artist",
"namespace": "player::parameters.artists.0",
Expand All @@ -85,52 +87,48 @@
},
{
"matches": [
"can you play",
"could you play",
"would you play",
"will you play"
"thank you",
"i would appreciate it"
],
"basename": "politeness",
"canBeMerged": false,
"index": 8
},
{
"matches": [
"some"
"play"
],
"basename": "filler",
"basename": "M:action",
"namespace": "player.playArtist::fullActionName",
"canBeMerged": false,
"index": 9
},
{
"matches": [
"bach",
"beethoven",
"mozart",
"chopin"
"some"
],
"basename": "M:artist",
"namespace": "player::parameters.artist",
"basename": "filler",
"canBeMerged": false,
"index": 10
},
{
"matches": [
"for me",
"to me",
"for myself",
"for my sake"
"bach",
"mozart",
"beethoven",
"chopin"
],
"basename": "filler",
"basename": "M:artist",
"namespace": "player::parameters.artist",
"canBeMerged": false,
"index": 11
},
{
"matches": [
"please",
"kindly",
"if you don't mind",
"if you please"
"for me",
"for us",
"for them",
"for everyone"
],
"basename": "politeness",
"canBeMerged": false,
Expand All @@ -157,26 +155,9 @@
]
},
{
"matchSet": "politeness_2",
"optional": true
}
]
},
{
"parts": [
{
"matchSet": "politeness_0",
"matchSet": "object_3",
"optional": true
},
{
"matchSet": "M:action_3",
"transformInfos": [
{
"namespace": "player.pause",
"transformName": "fullActionName"
}
]
},
{
"matchSet": "politeness_2",
"optional": true
Expand Down Expand Up @@ -221,21 +202,34 @@
"transformName": "parameters.artists.0"
}
]
},
{
"matchSet": "politeness_8",
"optional": true
}
]
},
{
"parts": [
{
"matchSet": "politeness_8",
"matchSet": "politeness_0",
"optional": true
},
{
"matchSet": "filler_9",
"matchSet": "M:action_9",
"transformInfos": [
{
"namespace": "player.playArtist",
"transformName": "fullActionName"
}
]
},
{
"matchSet": "filler_10",
"optional": true
},
{
"matchSet": "M:artist_10",
"matchSet": "M:artist_11",
"wildcardMode": 2,
"transformInfos": [
{
Expand All @@ -245,19 +239,13 @@
]
},
{
"matchSet": "filler_11",
"matchSet": "politeness_12",
"optional": true
},
{
"matchSet": "politeness_12",
"matchSet": "politeness_2",
"optional": true
}
],
"implicitParameters": [
{
"paramName": "fullActionName",
"paramValue": "player.playArtist"
}
]
}
]
Expand All @@ -276,13 +264,6 @@
"value": "player.pause",
"count": 1
}
],
[
"pause the music",
{
"value": "player.pause",
"count": 1
}
]
]
}
Expand Down Expand Up @@ -319,23 +300,23 @@
}
],
[
"prelude",
"fur elise",
{
"value": "Prelude",
"value": "Fur Elise",
"count": 0
}
],
[
"etude",
"moonlight sonata",
{
"value": "Etude",
"value": "Moonlight Sonata",
"count": 0
}
],
[
"ballade",
"clair de lune",
{
"value": "Ballade",
"value": "Clair de Lune",
"count": 0
}
]
Expand Down Expand Up @@ -366,9 +347,9 @@
}
],
[
"bach",
"debussy",
{
"value": "Bach",
"value": "Debussy",
"count": 0
}
]
Expand All @@ -385,16 +366,16 @@
}
],
[
"beethoven",
"mozart",
{
"value": "Beethoven",
"value": "Mozart",
"count": 0
}
],
[
"mozart",
"beethoven",
{
"value": "Mozart",
"value": "Beethoven",
"count": 0
}
],
Expand All @@ -408,6 +389,23 @@
]
}
]
},
{
"name": "player.playArtist",
"transforms": [
{
"name": "fullActionName",
"transform": [
[
"play",
{
"value": "player.playArtist",
"count": 1
}
]
]
}
]
}
]
}
Loading

0 comments on commit 4caac70

Please sign in to comment.