You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+117Lines changed: 117 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ Use this SDK to build Watson-powered applications in Unity. It comes with a set
14
14
*[Language Translation](#language-translation)
15
15
*[Dialog](#dialog)
16
16
*[Natural Language Classifier](#natural-language-classifier)
17
+
*[Tone Analyzer](#tone-analyzer)
18
+
*[Tradeoff Analytics](#tradeoff-analytics)
17
19
*[Visual Recognition](#visual-recognition)
18
20
*[Developing a basic application in one minute](#developing-a-basic-application-in-one-minute)
19
21
*[Documentation](#documentation)
@@ -211,6 +213,120 @@ You can use the Natural Language Classifier Editor to import and export classifi
211
213
2. In the **Name** field, specify a name for the classifier.
212
214
3. Click **Create**.
213
215
216
+
### Tone Analyzer
217
+
The [Tone Analyzer][tone_analyzer] service detects emotions, social tendencies and writing style from text input.
218
+
219
+
```
220
+
ToneAnalyzer m_ToneAnalyzer = new ToneAnalyzer();
221
+
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.";
The [Tradeoff Analytics][tradeoff_analytics] service helps people make better decisions when faced with multiple, sometimes conflicting, goals and alternatives.
235
+
236
+
```
237
+
void Start () {
238
+
Problem problemToSolve = new Problem();
239
+
problemToSolve.subject = "Test Subject";
240
+
241
+
List<Column> listColumn = new List<Column>();
242
+
Column columnPrice = new Column();
243
+
columnPrice.description = "Price Column to minimize";
244
+
columnPrice.range = new ValueRange();
245
+
((ValueRange)columnPrice.range).high = 600;
246
+
((ValueRange)columnPrice.range).low = 0;
247
+
columnPrice.type = "numeric";
248
+
columnPrice.key = "price";
249
+
columnPrice.full_name = "Price";
250
+
columnPrice.goal = "min";
251
+
columnPrice.is_objective = true;
252
+
columnPrice.format = "$####0.00";
253
+
254
+
Column columnWeight = new Column();
255
+
columnWeight.description = "Weight Column to minimize";
256
+
columnWeight.type = "numeric";
257
+
columnWeight.key = "weight";
258
+
columnWeight.full_name = "Weight";
259
+
columnWeight.goal = "min";
260
+
columnWeight.is_objective = true;
261
+
columnWeight.format = "####0 g";
262
+
263
+
Column columnBrandName = new Column();
264
+
columnBrandName.description = "All Brand Names";
265
+
columnBrandName.type = "categorical";
266
+
columnBrandName.key = "brand";
267
+
columnBrandName.full_name = "Brand";
268
+
columnBrandName.goal = "max";
269
+
columnBrandName.is_objective = true;
270
+
columnBrandName.preference = new string[]{"Samsung", "Apple", "HTC"};
271
+
columnBrandName.range = new CategoricalRange();
272
+
((CategoricalRange)columnBrandName.range).keys = new string[]{"Samsung", "Apple", "HTC"};
273
+
274
+
listColumn.Add(columnPrice);
275
+
listColumn.Add(columnWeight);
276
+
277
+
problemToSolve.columns = listColumn.ToArray();
278
+
279
+
280
+
List<Option> listOption = new List<Option>();
281
+
282
+
Option option1 = new Option();
283
+
option1.key = "1";
284
+
option1.name = "Samsung Galaxy S4";
285
+
option1.values = new TestDataValue();
286
+
(option1.values as TestDataValue).weight = 130;
287
+
(option1.values as TestDataValue).brand = "Samsung";
288
+
(option1.values as TestDataValue).price = 249;
289
+
listOption.Add(option1);
290
+
291
+
Option option2 = new Option();
292
+
option2.key = "2";
293
+
option2.name = "Apple iPhone 5";
294
+
option2.values = new TestDataValue();
295
+
(option2.values as TestDataValue).weight = 112;
296
+
(option2.values as TestDataValue).brand = "Apple";
public class TestDataValue : IBM.Watson.DeveloperCloud.Services.TradeoffAnalytics.v1.ApplicationDataValue
323
+
{
324
+
public double price { get; set; }
325
+
public double weight { get; set; }
326
+
public string brand { get; set; }
327
+
}
328
+
```
329
+
214
330
### Visual Recognition
215
331
Use the [Visual Recognition][visual_recognition] service to classify an image against a default or custom trained classifier. In addition, the service can detect faces and text in an image.
216
332
@@ -618,4 +734,5 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md).
0 commit comments