Skip to content

Commit ad01f04

Browse files
committed
Merge pull request #41 from watson-developer-cloud/feature-backloggedServices
Merging in services that I had merged into my local develop.
2 parents 1735e15 + cf41fb9 commit ad01f04

27 files changed

+1703
-9
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
Change Log
22
==========
3+
## Version 0.4.0
4+
5+
_2016-05-28_
6+
7+
* New: Added Tone Analyzer v3 abstraction
8+
* New: Added Tradeoff Analytics abstraction
9+
* New: Added Conversation abstraction
10+
* New: Added Visual Recognition v3 abstraction
11+
* Fix: Creating test project dynamically for Travis CL integration
312

413
## Version 0.3.0
514

@@ -10,4 +19,4 @@ _2016-04-29_
1019
* New: Added example code snippets showing how to access low level services
1120
* Fix: Restructured SDK to put non-core components in Examples
1221
* Fix: Fixed several usability issues
13-
* Fix: Revised several aspects of the SDK to match the formats of other WDC SDKs
22+
* Fix: Revised several aspects of the SDK to match the formats of other WDC SDKs

Config.json.enc

0 Bytes
Binary file not shown.

Examples/ServiceExamples/Scripts/ExampleDIalog.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 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 UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.Dialog.v1;
320

421
public class ExampleDIalog : MonoBehaviour

Examples/ServiceExamples/Scripts/ExampleLanguageTranslation.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 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 UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.LanguageTranslation.v1;
320

421
public class ExampleLanguageTranslation : MonoBehaviour {

Examples/ServiceExamples/Scripts/ExampleNaturalLanguageClassifier.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 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 UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.NaturalLanguageClassifier.v1;
320

421
public class ExampleNaturalLanguageClassifier : MonoBehaviour

Examples/ServiceExamples/Scripts/ExampleSpeechToText.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 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 UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.SpeechToText.v1;
320

421
public class ExampleSpeechToText : MonoBehaviour

Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 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 UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1;
320

421
public class ExampleTextToSpeech : MonoBehaviour
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* Copyright 2015 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+
19+
using UnityEngine;
20+
using System.Collections;
21+
using IBM.Watson.DeveloperCloud.Services.ToneAnalyzer.v3;
22+
23+
public class ExampleToneAnalyzer : MonoBehaviour {
24+
ToneAnalyzer m_ToneAnalyzer = new ToneAnalyzer();
25+
string m_StringToTestTone = "This service enables people to discover and understand, and revise the impact of tone in their content. It uses linguistic analysis to detect and interpret emotional, social, and language cues found in text.";
26+
27+
void Start () {
28+
m_ToneAnalyzer.GetToneAnalyze( OnGetToneAnalyze, m_StringToTestTone, "TEST");
29+
}
30+
31+
private void OnGetToneAnalyze( ToneAnalyzerResponse resp , string data)
32+
{
33+
Debug.Log("Response: " +resp + " - " + data);
34+
}
35+
}

Examples/ServiceExamples/Scripts/ExampleToneAnalyzer.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/**
2+
* Copyright 2015 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+
19+
using UnityEngine;
20+
using System.Collections;
21+
using System.Collections.Generic;
22+
using IBM.Watson.DeveloperCloud.Services.TradeoffAnalytics.v1;
23+
24+
public class ExampleTradeoffAnalytics : MonoBehaviour {
25+
TradeoffAnalytics m_TradeoffAnalytics = new TradeoffAnalytics();
26+
27+
void Start () {
28+
Problem problemToSolve = new Problem();
29+
problemToSolve.subject = "Test Subject";
30+
31+
List<Column> listColumn = new List<Column>();
32+
Column columnPrice = new Column();
33+
columnPrice.description = "Price Column to minimize";
34+
columnPrice.range = new ValueRange();
35+
((ValueRange)columnPrice.range).high = 600;
36+
((ValueRange)columnPrice.range).low = 0;
37+
columnPrice.type = "numeric";
38+
columnPrice.key = "price";
39+
columnPrice.full_name = "Price";
40+
columnPrice.goal = "min";
41+
columnPrice.is_objective = true;
42+
columnPrice.format = "$####0.00";
43+
44+
Column columnWeight = new Column();
45+
columnWeight.description = "Weight Column to minimize";
46+
columnWeight.type = "numeric";
47+
columnWeight.key = "weight";
48+
columnWeight.full_name = "Weight";
49+
columnWeight.goal = "min";
50+
columnWeight.is_objective = true;
51+
columnWeight.format = "####0 g";
52+
53+
Column columnBrandName = new Column();
54+
columnBrandName.description = "All Brand Names";
55+
columnBrandName.type = "categorical";
56+
columnBrandName.key = "brand";
57+
columnBrandName.full_name = "Brand";
58+
columnBrandName.goal = "max";
59+
columnBrandName.is_objective = true;
60+
columnBrandName.preference = new string[]{"Samsung", "Apple", "HTC"};
61+
columnBrandName.range = new CategoricalRange();
62+
((CategoricalRange)columnBrandName.range).keys = new string[]{"Samsung", "Apple", "HTC"};
63+
64+
listColumn.Add(columnPrice);
65+
listColumn.Add(columnWeight);
66+
// listColumn.Add(columnBrandName);
67+
68+
problemToSolve.columns = listColumn.ToArray();
69+
70+
71+
List<Option> listOption = new List<Option>();
72+
73+
Option option1 = new Option();
74+
option1.key = "1";
75+
option1.name = "Samsung Galaxy S4";
76+
option1.values = new TestDataValue();
77+
(option1.values as TestDataValue).weight = 130;
78+
(option1.values as TestDataValue).brand = "Samsung";
79+
(option1.values as TestDataValue).price = 249;
80+
listOption.Add(option1);
81+
82+
Option option2 = new Option();
83+
option2.key = "2";
84+
option2.name = "Apple iPhone 5";
85+
option2.values = new TestDataValue();
86+
(option2.values as TestDataValue).weight = 112;
87+
(option2.values as TestDataValue).brand = "Apple";
88+
(option2.values as TestDataValue).price = 599;
89+
listOption.Add(option2);
90+
91+
Option option3 = new Option();
92+
option3.key = "3";
93+
option3.name = "HTC One";
94+
option3.values = new TestDataValue();
95+
(option3.values as TestDataValue).weight = 143;
96+
(option3.values as TestDataValue).brand = "HTC";
97+
(option3.values as TestDataValue).price = 299;
98+
listOption.Add(option3);
99+
100+
problemToSolve.options = listOption.ToArray();
101+
102+
m_TradeoffAnalytics.GetDilemma( OnGetDilemma, problemToSolve, false );
103+
}
104+
105+
private void OnGetDilemma( DilemmasResponse resp )
106+
{
107+
Debug.Log("Response: " + resp);
108+
}
109+
110+
/// <summary>
111+
/// Application data value.
112+
/// </summary>
113+
public class TestDataValue : IBM.Watson.DeveloperCloud.Services.TradeoffAnalytics.v1.ApplicationDataValue
114+
{
115+
public double price { get; set; }
116+
public double weight { get; set; }
117+
public string brand { get; set; }
118+
}
119+
120+
/// <summary>
121+
/// Application data.
122+
/// </summary>
123+
public class TestData : IBM.Watson.DeveloperCloud.Services.TradeoffAnalytics.v1.ApplicationData
124+
{
125+
126+
}
127+
}

0 commit comments

Comments
 (0)