Skip to content

Commit 14249fb

Browse files
committed
chore: merge in develop
2 parents 1e6d379 + 8d0a01f commit 14249fb

File tree

13 files changed

+673
-253
lines changed

13 files changed

+673
-253
lines changed

Scripts/Services/Assistant/v1/Models/DialogNodeAction.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,19 @@ public enum ActionTypeEnum
4343
/// Enum SERVER for server
4444
/// </summary>
4545
[EnumMember(Value = "server")]
46-
SERVER
46+
SERVER,
47+
48+
/// <summary>
49+
/// Enum CLOUD_FUNCTION for cloud_function
50+
/// </summary>
51+
[EnumMember(Value = "cloud_function")]
52+
CLOUD_FUNCTION,
53+
54+
/// <summary>
55+
/// Enum WEB_ACTION for web_action
56+
/// </summary>
57+
[EnumMember(Value = "web_action")]
58+
WEB_ACTION
4759
}
4860

4961
/// <summary>

Scripts/Services/Assistant/v2/Models/DialogNodeAction.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ public enum ActionTypeEnum
4040
/// Enum server for server
4141
/// </summary>
4242
[EnumMember(Value = "server")]
43-
server
43+
server,
44+
45+
/// <summary>
46+
/// Enum WEB_ACTION for web-action
47+
/// </summary>
48+
[EnumMember(Value = "web-action")]
49+
web_action,
50+
51+
/// <summary>
52+
/// Enum CLOUD_FUNCTION for cloud-function
53+
/// </summary>
54+
[EnumMember(Value = "cloud-function")]
55+
cloud_function
4456
}
4557

4658
/// <summary>

Scripts/Services/Discovery/v1/Discovery.cs

Lines changed: 284 additions & 24 deletions
Large diffs are not rendered by default.

Scripts/Services/Discovery/v1/Models/LogQueryResponseResult.cs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,6 @@ namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
2727
[fsObject]
2828
public class LogQueryResponseResult
2929
{
30-
/// <summary>
31-
/// The type of log entry returned.
32-
///
33-
/// **query** indicates that the log represents the results of a call to the single collection **query**
34-
/// method.
35-
///
36-
/// **event** indicates that the log represents a call to the **events** API.
37-
/// </summary>
38-
public enum DocumentTypeEnum
39-
{
40-
/// <summary>
41-
/// Enum query for query
42-
/// </summary>
43-
[EnumMember(Value = "query")]
44-
query,
45-
/// <summary>
46-
/// Enum _event for event
47-
/// </summary>
48-
[EnumMember(Value = "event")]
49-
_event
50-
}
51-
5230
/// <summary>
5331
/// The type of event that this object respresents. Possible values are
5432
///
@@ -91,7 +69,7 @@ public enum ResultTypeEnum
9169
/// **event** indicates that the log represents a call to the **events** API.
9270
/// </summary>
9371
[fsProperty("document_type")]
94-
public DocumentTypeEnum? DocumentType { get; set; }
72+
public string DocumentType { get; set; }
9573
/// <summary>
9674
/// The type of event that this object respresents. Possible values are
9775
///
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright 2018 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 FullSerializer;
19+
using System.Collections.Generic;
20+
21+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
22+
{
23+
/// <summary>
24+
/// Tokenization dictionary describing how words are tokenized during ingestion and at query time.
25+
/// </summary>
26+
[fsObject]
27+
public class TokenDict
28+
{
29+
/// <summary>
30+
/// An array of tokenization rules. Each rule contains, the original `text` string, component `tokens`, any
31+
/// alternate character set `readings`, and which `part_of_speech` the text is from.
32+
/// </summary>
33+
[fsProperty("tokenization_rules")]
34+
public List<TokenDictRule> TokenizationRules { get; set; }
35+
}
36+
37+
}

Scripts/UnitTests/TestLanguageTranslatorV2.cs.meta renamed to Scripts/Services/Discovery/v1/Models/TokenDict.cs.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Copyright 2018 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 FullSerializer;
19+
using System.Collections.Generic;
20+
21+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
22+
{
23+
/// <summary>
24+
/// An object defining a single tokenizaion rule.
25+
/// </summary>
26+
[fsObject]
27+
public class TokenDictRule
28+
{
29+
/// <summary>
30+
/// The string to tokenize.
31+
/// </summary>
32+
[fsProperty("text")]
33+
public string Text { get; set; }
34+
/// <summary>
35+
/// Array of tokens that the `text` field is split into when found.
36+
/// </summary>
37+
[fsProperty("tokens")]
38+
public List<string> Tokens { get; set; }
39+
/// <summary>
40+
/// Array of tokens that represent the content of the `text` field in an alternate character set.
41+
/// </summary>
42+
[fsProperty("readings")]
43+
public List<string> Readings { get; set; }
44+
/// <summary>
45+
/// The part of speech that the `text` string belongs to. For example `noun`. Custom parts of speech can be
46+
/// specified.
47+
/// </summary>
48+
[fsProperty("part_of_speech")]
49+
public string PartOfSpeech { get; set; }
50+
}
51+
52+
}

Scripts/Services/Discovery/v1/Models/TokenDictRule.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* Copyright 2018 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 FullSerializer;
19+
using System.Runtime.Serialization;
20+
21+
namespace IBM.Watson.DeveloperCloud.Services.Discovery.v1
22+
{
23+
/// <summary>
24+
/// Object describing the current status of the tokenization dictionary.
25+
/// </summary>
26+
[fsObject]
27+
public class TokenDictStatusResponse
28+
{
29+
/// <summary>
30+
/// Current tokenization dictionary status for the specified collection.
31+
/// </summary>
32+
[fsProperty("status")]
33+
public string Status { get; set; }
34+
/// <summary>
35+
/// The type for this dictionary. Always returns `tokenization_dictionary`.
36+
/// </summary>
37+
[fsProperty("type")]
38+
public string Type { get; set; }
39+
}
40+
41+
}

Scripts/Services/Discovery/v1/Models/TokenDictStatusResponse.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/SpeechToText/v1/SpeechToText.cs

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ public bool DisableSslVerification
117117
private int _recordingHZ = -1;
118118
private int _inactivityTimeout = 60;
119119
private string _customization_id = null;
120+
private string _languageCustomizationId = null;
120121
private string _acoustic_customization_id = null;
121-
private float _customization_weight = 0.3f;
122+
private float? _customization_weight = null;
122123
private bool _streamMultipart = false; // If true sets `Transfer-Encoding` header of multipart request to `chunked`.
123124
private float _silenceDuration = 0.0f;
124125
private float _silenceCutoff = 1.0f;
@@ -253,15 +254,20 @@ public Credentials Credentials
253254
/// <summary>
254255
/// Specifies the Globally Unique Identifier (GUID) of a custom language model that is to be used for all requests sent over the connection. The base model of the custom language model must match the value of the model parameter. By default, no custom language model is used. For more information, see https://console.bluemix.net/docs/services/speech-to-text/custom.html.
255256
/// </summary>
257+
[Obsolete("Use LanguageCustomizationId instead.")]
256258
public string CustomizationId { get { return _customization_id; } set { _customization_id = value; } }
257259
/// <summary>
260+
/// Specifies the Globally Unique Identifier (GUID) of a custom language model that is to be used for all requests sent over the connection. The base model of the custom language model must match the value of the model parameter. By default, no custom language model is used. For more information, see https://console.bluemix.net/docs/services/speech-to-text/custom.html.
261+
/// </summary>
262+
public string LanguageCustomizationId { get { return _languageCustomizationId; } set { _languageCustomizationId = value; } }
263+
/// <summary>
258264
/// Specifies the Globally Unique Identifier (GUID) of a custom acoustic model that is to be used for all requests sent over the connection. The base model of the custom acoustic model must match the value of the model parameter. By default, no custom acoustic model is used. For more information, see https://console.bluemix.net/docs/services/speech-to-text/custom.html.
259265
/// </summary>
260266
public string AcousticCustomizationId { get { return _acoustic_customization_id; } set { _acoustic_customization_id = value; } }
261267
/// <summary>
262268
/// Specifies the weight the service gives to words from a specified custom language model compared to those from the base model for all requests sent over the connection. Specify a value between 0.0 and 1.0; the default value is 0.3. For more information, see https://console.bluemix.net/docs/services/speech-to-text/language-use.html#weight.
263269
/// </summary>
264-
public float CustomizationWeight { get { return _customization_weight; } set { _customization_weight = value; } }
270+
public float? CustomizationWeight { get { return _customization_weight; } set { _customization_weight = value; } }
265271
/// <summary>
266272
/// If true sets `Transfer-Encoding` request header to `chunked` causing the audio to be streamed to the service. By default, audio is sent all at once as a one-shot delivery. See https://console.bluemix.net/docs/services/speech-to-text/input.html#transmission.
267273
/// </summary>
@@ -665,11 +671,21 @@ private bool CreateListenConnector()
665671
{
666672
Dictionary<string, string> queryParams = new Dictionary<string, string>();
667673
if (!string.IsNullOrEmpty(CustomizationId))
674+
{
668675
queryParams["customization_id"] = CustomizationId;
676+
}
677+
if (!string.IsNullOrEmpty(LanguageCustomizationId))
678+
{
679+
queryParams["language_customization_id"] = LanguageCustomizationId;
680+
}
669681
if (!string.IsNullOrEmpty(AcousticCustomizationId))
682+
{
670683
queryParams["acoustic_customization_id"] = AcousticCustomizationId;
671-
if (!string.IsNullOrEmpty(CustomizationId))
684+
}
685+
if (CustomizationWeight != null)
686+
{
672687
queryParams["customization_weight"] = CustomizationWeight.ToString();
688+
}
673689

674690
string parsedParams = "";
675691

@@ -955,12 +971,21 @@ public bool Recognize(SuccessCallback<SpeechRecognitionEvent> successCallback, F
955971
return false;
956972
}
957973
if (!string.IsNullOrEmpty(AcousticCustomizationId))
974+
{
958975
req.Parameters["acoustic_customization_id"] = AcousticCustomizationId;
976+
}
959977
if (!string.IsNullOrEmpty(CustomizationId))
960978
{
961979
req.Parameters["customization_id"] = CustomizationId;
980+
}
981+
if (CustomizationWeight != null)
982+
{
962983
req.Parameters["customization_weight"] = CustomizationWeight;
963984
}
985+
if (!string.IsNullOrEmpty(LanguageCustomizationId))
986+
{
987+
req.Parameters["language_customization_id"] = LanguageCustomizationId;
988+
}
964989
req.Parameters["inactivity_timeout"] = InactivityTimeout;
965990
req.Parameters["keywords"] = string.Join(",", Keywords);
966991
req.Parameters["keywords_threshold"] = KeywordsThreshold;

0 commit comments

Comments
 (0)