Skip to content

Commit 10c4529

Browse files
committed
feat(regenerate): updates for regular release 4
Includes changes to: STT, C&C, AssistantV2 and NLU
1 parent fc81f89 commit 10c4529

38 files changed

+1313
-113
lines changed

Scripts/Services/Assistant/V1/Model/RuntimeEntity.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public class RuntimeEntity
3737
[JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)]
3838
public List<long?> Location { get; set; }
3939
/// <summary>
40-
/// The term in the input text that was recognized as an entity value.
40+
/// The entity value that was recognized in the user input.
4141
/// </summary>
4242
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
4343
public string Value { get; set; }
4444
/// <summary>
45-
/// A decimal percentage that represents Watson's confidence in the entity.
45+
/// A decimal percentage that represents Watson's confidence in the recognized entity.
4646
/// </summary>
4747
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
4848
public float? Confidence { get; set; }
@@ -56,5 +56,12 @@ public class RuntimeEntity
5656
/// </summary>
5757
[JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)]
5858
public List<CaptureGroup> Groups { get; set; }
59+
/// <summary>
60+
/// An object containing detailed information about the entity recognized in the user input.
61+
///
62+
/// This property is a part of the new system entities, which are a beta feature.
63+
/// </summary>
64+
[JsonProperty("interpretation", NullValueHandling = NullValueHandling.Ignore)]
65+
public RuntimeEntityInterpretation Interpretation { get; set; }
5966
}
6067
}
Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using Newtonsoft.Json;
19+
20+
namespace IBM.Watson.Assistant.V1.Model
21+
{
22+
/// <summary>
23+
/// RuntimeEntityInterpretation.
24+
/// </summary>
25+
public class RuntimeEntityInterpretation
26+
{
27+
/// <summary>
28+
/// The precision or duration of a time range specified by a recognized `@sys-time` or `@sys-date` entity.
29+
/// </summary>
30+
public class GranularityValue
31+
{
32+
/// <summary>
33+
/// Constant DAY for day
34+
/// </summary>
35+
public const string DAY = "day";
36+
/// <summary>
37+
/// Constant FORTNIGHT for fortnight
38+
/// </summary>
39+
public const string FORTNIGHT = "fortnight";
40+
/// <summary>
41+
/// Constant HOUR for hour
42+
/// </summary>
43+
public const string HOUR = "hour";
44+
/// <summary>
45+
/// Constant INSTANT for instant
46+
/// </summary>
47+
public const string INSTANT = "instant";
48+
/// <summary>
49+
/// Constant MINUTE for minute
50+
/// </summary>
51+
public const string MINUTE = "minute";
52+
/// <summary>
53+
/// Constant MONTH for month
54+
/// </summary>
55+
public const string MONTH = "month";
56+
/// <summary>
57+
/// Constant QUARTER for quarter
58+
/// </summary>
59+
public const string QUARTER = "quarter";
60+
/// <summary>
61+
/// Constant SECOND for second
62+
/// </summary>
63+
public const string SECOND = "second";
64+
/// <summary>
65+
/// Constant WEEK for week
66+
/// </summary>
67+
public const string WEEK = "week";
68+
/// <summary>
69+
/// Constant WEEKEND for weekend
70+
/// </summary>
71+
public const string WEEKEND = "weekend";
72+
/// <summary>
73+
/// Constant YEAR for year
74+
/// </summary>
75+
public const string YEAR = "year";
76+
77+
}
78+
79+
/// <summary>
80+
/// The precision or duration of a time range specified by a recognized `@sys-time` or `@sys-date` entity.
81+
/// Constants for possible values can be found using RuntimeEntityInterpretation.GranularityValue
82+
/// </summary>
83+
[JsonProperty("granularity", NullValueHandling = NullValueHandling.Ignore)]
84+
public string Granularity { get; set; }
85+
/// <summary>
86+
/// The calendar used to represent a recognized date (for example, `Gregorian`).
87+
/// </summary>
88+
[JsonProperty("calendar_type", NullValueHandling = NullValueHandling.Ignore)]
89+
public string CalendarType { get; set; }
90+
/// <summary>
91+
/// A unique identifier used to associate a recognized time and date. If the user input contains a date and time
92+
/// that are mentioned together (for example, `Today at 5`, the same **datetime_link** value is returned for
93+
/// both the `@sys-date` and `@sys-time` entities).
94+
/// </summary>
95+
[JsonProperty("datetime_link", NullValueHandling = NullValueHandling.Ignore)]
96+
public string DatetimeLink { get; set; }
97+
/// <summary>
98+
/// A locale-specific holiday name (such as `thanksgiving` or `christmas`). This property is included when a
99+
/// `@sys-date` entity is recognized based on a holiday name in the user input.
100+
/// </summary>
101+
[JsonProperty("festival", NullValueHandling = NullValueHandling.Ignore)]
102+
public string Festival { get; set; }
103+
/// <summary>
104+
/// A unique identifier used to associate multiple recognized `@sys-date`, `@sys-time`, or `@sys-number`
105+
/// entities that are recognized as a range of values in the user's input (for example, `from July 4 until July
106+
/// 14` or `from 20 to 25`).
107+
/// </summary>
108+
[JsonProperty("range_link", NullValueHandling = NullValueHandling.Ignore)]
109+
public string RangeLink { get; set; }
110+
/// <summary>
111+
/// The word in the user input that indicates that a `sys-date` or `sys-time` entity is part of an implied range
112+
/// where only one date or time is specified (for example, `since` or `until`).
113+
/// </summary>
114+
[JsonProperty("range_modifier", NullValueHandling = NullValueHandling.Ignore)]
115+
public string RangeModifier { get; set; }
116+
/// <summary>
117+
/// A recognized mention of a relative day, represented numerically as an offset from the current date (for
118+
/// example, `-1` for `yesterday` or `10` for `in ten days`).
119+
/// </summary>
120+
[JsonProperty("relative_day", NullValueHandling = NullValueHandling.Ignore)]
121+
public float? RelativeDay { get; set; }
122+
/// <summary>
123+
/// A recognized mention of a relative month, represented numerically as an offset from the current month (for
124+
/// example, `1` for `next month` or `-3` for `three months ago`).
125+
/// </summary>
126+
[JsonProperty("relative_month", NullValueHandling = NullValueHandling.Ignore)]
127+
public float? RelativeMonth { get; set; }
128+
/// <summary>
129+
/// A recognized mention of a relative week, represented numerically as an offset from the current week (for
130+
/// example, `2` for `in two weeks` or `-1` for `last week).
131+
/// </summary>
132+
[JsonProperty("relative_week", NullValueHandling = NullValueHandling.Ignore)]
133+
public float? RelativeWeek { get; set; }
134+
/// <summary>
135+
/// A recognized mention of a relative date range for a weekend, represented numerically as an offset from the
136+
/// current weekend (for example, `0` for `this weekend` or `-1` for `last weekend`).
137+
/// </summary>
138+
[JsonProperty("relative_weekend", NullValueHandling = NullValueHandling.Ignore)]
139+
public float? RelativeWeekend { get; set; }
140+
/// <summary>
141+
/// A recognized mention of a relative year, represented numerically as an offset from the current year (for
142+
/// example, `1` for `next year` or `-5` for `five years ago`).
143+
/// </summary>
144+
[JsonProperty("relative_year", NullValueHandling = NullValueHandling.Ignore)]
145+
public float? RelativeYear { get; set; }
146+
/// <summary>
147+
/// A recognized mention of a specific date, represented numerically as the date within the month (for example,
148+
/// `30` for `June 30`.).
149+
/// </summary>
150+
[JsonProperty("specific_day", NullValueHandling = NullValueHandling.Ignore)]
151+
public float? SpecificDay { get; set; }
152+
/// <summary>
153+
/// A recognized mention of a specific day of the week as a lowercase string (for example, `monday`).
154+
/// </summary>
155+
[JsonProperty("specific_day_of_week", NullValueHandling = NullValueHandling.Ignore)]
156+
public string SpecificDayOfWeek { get; set; }
157+
/// <summary>
158+
/// A recognized mention of a specific month, represented numerically (for example, `7` for `July`).
159+
/// </summary>
160+
[JsonProperty("specific_month", NullValueHandling = NullValueHandling.Ignore)]
161+
public float? SpecificMonth { get; set; }
162+
/// <summary>
163+
/// A recognized mention of a specific quarter, represented numerically (for example, `3` for `the third
164+
/// quarter`).
165+
/// </summary>
166+
[JsonProperty("specific_quarter", NullValueHandling = NullValueHandling.Ignore)]
167+
public float? SpecificQuarter { get; set; }
168+
/// <summary>
169+
/// A recognized mention of a specific year (for example, `2016`).
170+
/// </summary>
171+
[JsonProperty("specific_year", NullValueHandling = NullValueHandling.Ignore)]
172+
public float? SpecificYear { get; set; }
173+
/// <summary>
174+
/// A recognized numeric value, represented as an integer or double.
175+
/// </summary>
176+
[JsonProperty("numeric_value", NullValueHandling = NullValueHandling.Ignore)]
177+
public float? NumericValue { get; set; }
178+
/// <summary>
179+
/// The type of numeric value recognized in the user input (`integer` or `rational`).
180+
/// </summary>
181+
[JsonProperty("subtype", NullValueHandling = NullValueHandling.Ignore)]
182+
public string Subtype { get; set; }
183+
/// <summary>
184+
/// A recognized term for a time that was mentioned as a part of the day in the user's input (for example,
185+
/// `morning` or `afternoon`). In addition, the returned entity value is set to a specific time:
186+
///
187+
/// - `09:00:00` for `morning`
188+
/// - `15:00:00` for `afternoon`
189+
/// - `18:00:00` for `evening`
190+
/// - `22:00:00` for `night`
191+
/// - `00:00:00` for `midnight`.
192+
/// </summary>
193+
[JsonProperty("part_of_day", NullValueHandling = NullValueHandling.Ignore)]
194+
public string PartOfDay { get; set; }
195+
/// <summary>
196+
/// A recognized mention of a relative hour, represented numerically as an offset from the current hour (for
197+
/// example, `3` for `in three hours` or `-1` for `an hour ago`).
198+
/// </summary>
199+
[JsonProperty("relative_hour", NullValueHandling = NullValueHandling.Ignore)]
200+
public float? RelativeHour { get; set; }
201+
/// <summary>
202+
/// A recognized mention of a relative time, represented numerically as an offset in minutes from the current
203+
/// time (for example, `5` for `in five minutes` or `-15` for `fifteen minutes ago`).
204+
/// </summary>
205+
[JsonProperty("relative_minute", NullValueHandling = NullValueHandling.Ignore)]
206+
public float? RelativeMinute { get; set; }
207+
/// <summary>
208+
/// A recognized mention of a relative time, represented numerically as an offset in seconds from the current
209+
/// time (for example, `10` for `in ten seconds` or `-30` for `thirty seconds ago`).
210+
/// </summary>
211+
[JsonProperty("relative_second", NullValueHandling = NullValueHandling.Ignore)]
212+
public float? RelativeSecond { get; set; }
213+
/// <summary>
214+
/// A recognized specific hour mentioned as part of a time value (for example, `10` for `10:15 AM`.).
215+
/// </summary>
216+
[JsonProperty("specific_hour", NullValueHandling = NullValueHandling.Ignore)]
217+
public float? SpecificHour { get; set; }
218+
/// <summary>
219+
/// A recognized specific minute mentioned as part of a time value (for example, `15` for `10:15 AM`.).
220+
/// </summary>
221+
[JsonProperty("specific_minute", NullValueHandling = NullValueHandling.Ignore)]
222+
public float? SpecificMinute { get; set; }
223+
/// <summary>
224+
/// A recognized specific second mentioned as part of a time value (for example, `30` for `10:15:30 AM`.).
225+
/// </summary>
226+
[JsonProperty("specific_second", NullValueHandling = NullValueHandling.Ignore)]
227+
public float? SpecificSecond { get; set; }
228+
/// <summary>
229+
/// A recognized time zone mentioned as part of a time value (for example, `EST`).
230+
/// </summary>
231+
[JsonProperty("timezone", NullValueHandling = NullValueHandling.Ignore)]
232+
public string Timezone { get; set; }
233+
}
234+
}

Scripts/Services/Assistant/V2/Model/DialogRuntimeResponseGeneric.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,16 @@ public class PreferenceValue
151151
/// </summary>
152152
[JsonProperty("suggestions", NullValueHandling = NullValueHandling.Ignore)]
153153
public List<DialogSuggestion> Suggestions { get; set; }
154+
/// <summary>
155+
/// The title or introductory text to show before the response. This text is defined in the search skill
156+
/// configuration.
157+
/// </summary>
158+
[JsonProperty("header", NullValueHandling = NullValueHandling.Ignore)]
159+
public string Header { get; set; }
160+
/// <summary>
161+
/// An array of objects containing search results.
162+
/// </summary>
163+
[JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)]
164+
public List<SearchResult> Results { get; set; }
154165
}
155166
}

Scripts/Services/Assistant/V2/Model/RuntimeEntity.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace IBM.Watson.Assistant.V2.Model
2222
{
2323
/// <summary>
24-
/// A term from the request that was identified as an entity.
24+
/// The entity value that was recognized in the user input.
2525
/// </summary>
2626
public class RuntimeEntity
2727
{
@@ -42,7 +42,7 @@ public class RuntimeEntity
4242
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
4343
public string Value { get; set; }
4444
/// <summary>
45-
/// A decimal percentage that represents Watson's confidence in the entity.
45+
/// A decimal percentage that represents Watson's confidence in the recognized entity.
4646
/// </summary>
4747
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
4848
public float? Confidence { get; set; }
@@ -56,5 +56,12 @@ public class RuntimeEntity
5656
/// </summary>
5757
[JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)]
5858
public List<CaptureGroup> Groups { get; set; }
59+
/// <summary>
60+
/// An object containing detailed information about the entity recognized in the user input.
61+
///
62+
/// This property is a part of the new system entities, which are a beta feature.
63+
/// </summary>
64+
[JsonProperty("interpretation", NullValueHandling = NullValueHandling.Ignore)]
65+
public RuntimeEntityInterpretation Interpretation { get; set; }
5966
}
6067
}

0 commit comments

Comments
 (0)