Skip to content

Commit 8d50f3a

Browse files
committed
documentation, removed root dataModel class from personaliy insights
1 parent 3b1f1dc commit 8d50f3a

File tree

8 files changed

+398
-347
lines changed

8 files changed

+398
-347
lines changed

Docs/UnitySDK.shfbproj

Lines changed: 93 additions & 91 deletions
Large diffs are not rendered by default.

Examples/ServiceExamples/Scripts/ExamplePersonalityInsights.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ void Start ()
2929
LogSystem.InstallDefaultReactors();
3030
string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";
3131

32-
if(!m_personalityInsights.GetProfile(OnGetProfile, dataPath, DataModels.ContentType.TEXT_PLAIN, DataModels.Language.ENGLISH))
32+
if(!m_personalityInsights.GetProfile(OnGetProfile, dataPath, ContentType.TEXT_PLAIN, Language.ENGLISH))
3333
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
3434
}
3535

36-
private void OnGetProfile(DataModels.Profile profile, string data)
36+
private void OnGetProfile(Profile profile, string data)
3737
{
3838
Log.Debug("ExamplePersonalityInsights", "data: {0}", data);
3939
if(profile != null)
@@ -60,7 +60,7 @@ private void OnGetProfile(DataModels.Profile profile, string data)
6060
}
6161
}
6262

63-
private void LogTraitTree(DataModels.TraitTreeNode traitTreeNode)
63+
private void LogTraitTree(TraitTreeNode traitTreeNode)
6464
{
6565
if(!string.IsNullOrEmpty(traitTreeNode.id))
6666
Log.Debug("ExamplePersonalityInsights", "id: {0}", traitTreeNode.id);
@@ -77,7 +77,7 @@ private void LogTraitTree(DataModels.TraitTreeNode traitTreeNode)
7777
if(!string.IsNullOrEmpty(traitTreeNode.raw_sampling_error))
7878
Log.Debug("ExamplePersonalityInsights", "raw_sampling_error: {0}", traitTreeNode.raw_sampling_error);
7979
if(traitTreeNode.children != null && traitTreeNode.children.Length > 0)
80-
foreach(DataModels.TraitTreeNode childNode in traitTreeNode.children)
80+
foreach(TraitTreeNode childNode in traitTreeNode.children)
8181
LogTraitTree(childNode);
8282
}
8383
}

Scripts/Services/DeepQA/DataModels.cs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@
2020

2121
namespace IBM.Watson.DeveloperCloud.Services.DeepQA.v1
2222
{
23+
/// <summary>
24+
/// The returned value.
25+
/// </summary>
2326
[fsObject]
2427
public class Value
2528
{
2629
public string value { get; set; }
2730
};
2831

32+
/// <summary>
33+
/// The metadata of the answer.
34+
/// </summary>
2935
[fsObject]
3036
public class MetaDataMap
3137
{
@@ -37,6 +43,9 @@ public class MetaDataMap
3743
public string CorpusPlusDocno { get; set; }
3844
};
3945

46+
/// <summary>
47+
/// The evidence of the answer.
48+
/// </summary>
4049
[fsObject]
4150
public class Evidence
4251
{
@@ -50,6 +59,9 @@ public class Evidence
5059
public MetaDataMap metadataMap { get; set; }
5160
};
5261

62+
/// <summary>
63+
/// Synonym of an answer.
64+
/// </summary>
5365
[fsObject]
5466
public class Synonym
5567
{
@@ -58,13 +70,19 @@ public class Synonym
5870
public double weight { get; set; }
5971
};
6072

73+
/// <summary>
74+
/// Synonym set.
75+
/// </summary>
6176
[fsObject]
6277
public class SynSet
6378
{
6479
public string name { get; set; }
6580
public Synonym[] synSet { get; set; }
6681
};
6782

83+
/// <summary>
84+
/// Synonym list.
85+
/// </summary>
6886
[fsObject]
6987
public class SynonymList
7088
{
@@ -74,13 +92,19 @@ public class SynonymList
7492
public SynSet[] synSet { get; set; }
7593
};
7694

95+
/// <summary>
96+
/// The evidence request.
97+
/// </summary>
7798
[fsObject]
7899
public class EvidenceRequest
79100
{
80101
public long items { get; set; }
81102
public string profile { get; set; }
82103
};
83104

105+
/// <summary>
106+
/// The answer.
107+
/// </summary>
84108
[fsObject]
85109
public class Answer
86110
{
@@ -101,19 +125,29 @@ private static string CleanInnerText(string text)
101125
return text.Trim(new char[] { '\n', '\r', '\t', ' ' });
102126
}
103127

128+
/// <summary>
129+
/// Answer cell.
130+
/// </summary>
104131
[fsObject]
105132
public class Cell
106133
{
107134
public string Value { get; set; }
108135
public int ColSpan { get; set; } // how many colums does this cell span, by default just 1..
109136
public bool Highlighted { get; set; }
110137
};
138+
139+
/// <summary>
140+
/// Answer row.
141+
/// </summary>
111142
[fsObject]
112143
public class Row
113144
{
114145
public Cell[] columns { get; set; }
115146
};
116147

148+
/// <summary>
149+
/// Answer table.
150+
/// </summary>
117151
[fsObject]
118152
public class Table
119153
{
@@ -180,6 +214,10 @@ public Table[] ExtractTables(string answer)
180214
return null;
181215
}
182216
};
217+
218+
/// <summary>
219+
/// The word slots.
220+
/// </summary>
183221
[fsObject]
184222
public class Slots
185223
{
@@ -188,6 +226,10 @@ public class Slots
188226
public string objprep { get; set; }
189227
public string psubj { get; set; }
190228
};
229+
230+
/// <summary>
231+
/// The word.
232+
/// </summary>
191233
[fsObject]
192234
public class Word
193235
{
@@ -206,12 +248,19 @@ public class Word
206248
public Word[] lmods { get; set; }
207249
public Word[] rmods { get; set; }
208250
};
251+
252+
/// <summary>
253+
/// The parse tree.
254+
/// </summary>
209255
[fsObject]
210256
public class ParseTree : Word
211257
{
212258
public string parseScore { get; set; }
213259
};
214260

261+
/// <summary>
262+
/// The question.
263+
/// </summary>
215264
[fsObject]
216265
public class Question
217266
{
@@ -238,6 +287,10 @@ public class Question
238287

239288
public string questionId { get; set; } // local cache ID
240289
};
290+
291+
/// <summary>
292+
/// The question class.
293+
/// </summary>
241294
[fsObject]
242295
public class QuestionClass
243296
{

Scripts/Services/DeepQA/DeepQA.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
namespace IBM.Watson.DeveloperCloud.Services.DeepQA.v1
2828
{
2929
/// <summary>
30-
/// The DeepQA provides an abstraction for the deepQa/ services of Watson.
30+
/// The DeepQA provides an abstraction for the DeepQA services of Watson.
3131
/// </summary>
3232
public class DeepQA : IWatsonService
3333
{

Scripts/Services/LanguageTranslation/LanguageTranslation.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727

2828
namespace IBM.Watson.DeveloperCloud.Services.LanguageTranslation.v1
2929
{
30-
/// <summary>
31-
/// This class wraps the Language Translation service.
32-
/// <a href="http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/language-translation.html">Language Translation Service</a>
33-
/// </summary>
34-
public class LanguageTranslation : IWatsonService
30+
/// <summary>
31+
/// This class wraps the Language Translation service.
32+
/// <a href="http://www.ibm.com/watson/developercloud/language-translation.html">Language Translation Service</a>
33+
/// </summary>
34+
public class LanguageTranslation : IWatsonService
3535
{
3636
#region Public Types
3737
/// <summary>

0 commit comments

Comments
 (0)