diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f3d3684..6d82e4516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ Change Log ========== +## Version 0.6.1 +_2016-07-17_ + +* Fix: Updated documentation + ## Version 0.6.0 _2016-07-15_ diff --git a/Config.json.enc b/Config.json.enc index 87dce2fcd..473c4913c 100644 Binary files a/Config.json.enc and b/Config.json.enc differ diff --git a/Docs/UnitySDK.shfbproj b/Docs/UnitySDK.shfbproj index 406d7e3ca..6a16116d8 100644 --- a/Docs/UnitySDK.shfbproj +++ b/Docs/UnitySDK.shfbproj @@ -14,7 +14,7 @@ Documentation .NET Framework 3.5 - ..\Assets\Watson\Editor\Help\ + ..\Scripts\Editor\Help\ WatsonUnitySDK en-US @@ -25,7 +25,7 @@ False False True - 1.0.0.0 + 1.1.0.0 2 False C# @@ -37,8 +37,8 @@ Watson Unity SDK AboveNamespaces - - + + @@ -72,18 +72,28 @@ Version 1.0 of all services. Various utility classes. Widget classes. -Watson service classes. +Watson service classes. +Alchemy API version 1 service abstraction. +Conversation version 1 service abstraction. +Experimental Conversation service abstraction. +Deep QA version 1 service abstraction. +Dialog version 1 service abstraction. +Document Conversiont version 1 service abstraction. +Language Translator version 1 service abstraction. +Natural Language Classifier version 1 service abstraction. +Personality Insightst version 2 service abstraction. +Retrieve and Rankt version 1 service abstraction. +Speech to Text version 1 service abstraction. +Text to Speech version 1 service abstraction. +Tone Analyzer version 3 service abstraction. +Tradeoff Analytics version 1 service abstraction. +Visual Recognitionr version 3 service abstraction. +Language Translation version 1 service abstraction. - - - - - - @@ -96,32 +106,9 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -148,10 +135,6 @@ - - - - @@ -166,11 +149,6 @@ - - - - - @@ -183,26 +161,33 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + - Protected, ProtectedInternalAsProtected + ProtectedInternalAsProtected IBM.Watson Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter, AutoDocumentDispose + + + 100 diff --git a/Examples/ServiceExamples/Scripts/ExamplePersonalityInsights.cs b/Examples/ServiceExamples/Scripts/ExamplePersonalityInsights.cs index d32467959..d5cb7c05a 100644 --- a/Examples/ServiceExamples/Scripts/ExamplePersonalityInsights.cs +++ b/Examples/ServiceExamples/Scripts/ExamplePersonalityInsights.cs @@ -29,11 +29,11 @@ void Start () LogSystem.InstallDefaultReactors(); string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json"; - if(!m_personalityInsights.GetProfile(OnGetProfile, dataPath, DataModels.ContentType.TEXT_PLAIN, DataModels.Language.ENGLISH)) + if(!m_personalityInsights.GetProfile(OnGetProfile, dataPath, ContentType.TEXT_PLAIN, Language.ENGLISH)) Log.Debug("ExamplePersonalityInsights", "Failed to get profile!"); } - private void OnGetProfile(DataModels.Profile profile, string data) + private void OnGetProfile(Profile profile, string data) { Log.Debug("ExamplePersonalityInsights", "data: {0}", data); if(profile != null) @@ -60,7 +60,7 @@ private void OnGetProfile(DataModels.Profile profile, string data) } } - private void LogTraitTree(DataModels.TraitTreeNode traitTreeNode) + private void LogTraitTree(TraitTreeNode traitTreeNode) { if(!string.IsNullOrEmpty(traitTreeNode.id)) Log.Debug("ExamplePersonalityInsights", "id: {0}", traitTreeNode.id); @@ -77,7 +77,7 @@ private void LogTraitTree(DataModels.TraitTreeNode traitTreeNode) if(!string.IsNullOrEmpty(traitTreeNode.raw_sampling_error)) Log.Debug("ExamplePersonalityInsights", "raw_sampling_error: {0}", traitTreeNode.raw_sampling_error); if(traitTreeNode.children != null && traitTreeNode.children.Length > 0) - foreach(DataModels.TraitTreeNode childNode in traitTreeNode.children) + foreach(TraitTreeNode childNode in traitTreeNode.children) LogTraitTree(childNode); } } diff --git a/Scripts/Camera/CameraTarget.cs b/Scripts/Camera/CameraTarget.cs index 3af610cc6..1f6e17740 100644 --- a/Scripts/Camera/CameraTarget.cs +++ b/Scripts/Camera/CameraTarget.cs @@ -278,6 +278,10 @@ void Update() #region public Functions + /// + /// Sets the target position with offset. + /// + /// public void SetTargetPositionWithOffset(Vector3 offsetPosition) { m_OffsetPosition = offsetPosition; diff --git a/Scripts/Camera/WatsonCamera.cs b/Scripts/Camera/WatsonCamera.cs index bf50a2cfe..1327562a1 100644 --- a/Scripts/Camera/WatsonCamera.cs +++ b/Scripts/Camera/WatsonCamera.cs @@ -56,6 +56,9 @@ public class WatsonCamera : MonoBehaviour #region Public Variable + /// + /// Static instance of WatsonCamera. + /// public static WatsonCamera Instance { get @@ -64,6 +67,9 @@ public static WatsonCamera Instance } } + /// + /// The camera's current target. + /// public CameraTarget CurrentCameraTarget { get @@ -106,6 +112,9 @@ public CameraTarget CurrentCameraTarget } } + /// + /// The camera's default target. + /// public CameraTarget DefaultCameraTarget { get diff --git a/Scripts/Editor/Help/WatsonUnitySDK.chm b/Scripts/Editor/Help/WatsonUnitySDK.chm old mode 100644 new mode 100755 index 6ff80f7bc..385d58879 Binary files a/Scripts/Editor/Help/WatsonUnitySDK.chm and b/Scripts/Editor/Help/WatsonUnitySDK.chm differ diff --git a/Scripts/Editor/Help/WatsonUnitySDK.chm.meta b/Scripts/Editor/Help/WatsonUnitySDK.chm.meta old mode 100644 new mode 100755 index e1e450868..aff3c47c2 --- a/Scripts/Editor/Help/WatsonUnitySDK.chm.meta +++ b/Scripts/Editor/Help/WatsonUnitySDK.chm.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 9dc273cd0a6064b4d8bd5347af652d8a -timeCreated: 1448987291 +timeCreated: 1468588048 licenseType: Pro DefaultImporter: userData: diff --git a/Scripts/Services/AlchemyAPI/AlchemyAPI.cs b/Scripts/Services/AlchemyAPI/AlchemyAPI.cs index ac3edb999..94aca5ab7 100755 --- a/Scripts/Services/AlchemyAPI/AlchemyAPI.cs +++ b/Scripts/Services/AlchemyAPI/AlchemyAPI.cs @@ -29,10 +29,12 @@ namespace IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1 { - /// - /// Service integration for Alchemy API - /// - public class AlchemyAPI : IWatsonService + /// + /// This class wraps the Alchemy API Services. + /// Alchemy Language + /// AlchemyData News + /// + public class AlchemyAPI : IWatsonService { #region Private Data @@ -125,7 +127,13 @@ private void SetCredentials() /// public class GetAuthorsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetAuthors Callback { get; set; } } @@ -245,7 +253,13 @@ public bool GetRankedConcepts(OnGetRankedConcepts callback, string source, /// public class GetRankedConceptsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetRankedConcepts Callback { get; set; } } @@ -358,7 +372,13 @@ private void OnGetRankedConceptsResponse(RESTConnector.Request req, RESTConnecto /// public class GetDatesRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetDates Callback { get; set; } } @@ -474,7 +494,13 @@ private string GetCurrentDatetime() /// public class GetEmotionsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetEmotions Callback { get; set; } } @@ -609,7 +635,13 @@ public bool ExtractEntities(OnGetEntities callback, string source, /// public class GetEntitiesRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetEntities Callback { get; set; } } @@ -712,7 +744,13 @@ private void OnGetEntitiesResponse(RESTConnector.Request req, RESTConnector.Resp /// public class DetectFeedsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnDetectFeeds Callback { get; set; } } @@ -833,7 +871,13 @@ public bool ExtractKeywords(OnGetKeywords callback, string source, /// public class GetKeywordsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetKeywords Callback { get; set; } } @@ -942,7 +986,13 @@ private void OnGetKeywordsResponse(RESTConnector.Request req, RESTConnector.Resp /// public class GetLanguagesRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetLanguages Callback { get; set; } } @@ -1045,7 +1095,13 @@ private void OnGetLanguagesResponse(RESTConnector.Request req, RESTConnector.Res /// public class GetMicroformatsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetMicroformats Callback { get; set; } } @@ -1151,7 +1207,13 @@ private void OnGetMicroformatsResponse(RESTConnector.Request req, RESTConnector. /// public class GetPublicationDateRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetPublicationDate Callback { get; set; } } @@ -1293,8 +1355,14 @@ public bool GetRelations(OnGetRelations callback, string source, /// public class GetRelationsRequest : RESTConnector.Request { - public string Data { get; set; } - public OnGetRelations Callback { get; set; } + /// + /// Custom data. + /// + public string Data { get; set; } + /// + /// The callback. + /// + public OnGetRelations Callback { get; set; } } private void OnGetRelationsResponse(RESTConnector.Request req, RESTConnector.Response resp) @@ -1402,8 +1470,14 @@ private void OnGetRelationsResponse(RESTConnector.Request req, RESTConnector.Res /// public class GetTextSentimentRequest : RESTConnector.Request { - public string Data { get; set; } - public OnGetTextSentiment Callback { get; set; } + /// + /// Custom data. + /// + public string Data { get; set; } + /// + /// The callback. + /// + public OnGetTextSentiment Callback { get; set; } } private void OnGetTextSentimentResponse(RESTConnector.Request req, RESTConnector.Response resp) @@ -1515,8 +1589,14 @@ private void OnGetTextSentimentResponse(RESTConnector.Request req, RESTConnector /// public class GetTargetedSentimentRequest : RESTConnector.Request { - public string Data { get; set; } - public OnGetTargetedSentiment Callback { get; set; } + /// + /// Custom data. + /// + public string Data { get; set; } + /// + /// The callback. + /// + public OnGetTargetedSentiment Callback { get; set; } } private void OnGetTargetedSentimentResponse(RESTConnector.Request req, RESTConnector.Response resp) @@ -1624,8 +1704,14 @@ private void OnGetTargetedSentimentResponse(RESTConnector.Request req, RESTConne /// public class GetRankedTaxomomyRequest : RESTConnector.Request { - public string Data { get; set; } - public OnGetRankedTaxonomy Callback { get; set; } + /// + /// Custom data. + /// + public string Data { get; set; } + /// + /// The callback. + /// + public OnGetRankedTaxonomy Callback { get; set; } } private void OnGetRankedTaxonomyResponse(RESTConnector.Request req, RESTConnector.Response resp) @@ -1734,8 +1820,14 @@ private void OnGetRankedTaxonomyResponse(RESTConnector.Request req, RESTConnecto /// public class GetTextRequest : RESTConnector.Request { - public string Data { get; set; } - public OnGetText Callback { get; set; } + /// + /// Custom data. + /// + public string Data { get; set; } + /// + /// The callback. + /// + public OnGetText Callback { get; set; } } private void OnGetTextResponse(RESTConnector.Request req, RESTConnector.Response resp) @@ -1906,8 +1998,14 @@ private void OnGetTextResponse(RESTConnector.Request req, RESTConnector.Response /// public class GetTitleRequest : RESTConnector.Request { - public string Data { get; set; } - public OnGetTitle Callback { get; set; } + /// + /// Custom data. + /// + public string Data { get; set; } + /// + /// The callback. + /// + public OnGetTitle Callback { get; set; } } private void OnGetTitleResponse(RESTConnector.Request req, RESTConnector.Response resp) @@ -2091,7 +2189,13 @@ public bool GetCombinedData(OnGetCombinedData callback, string source, /// public class CombinedCallRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetCombinedData Callback { get; set; } } @@ -2189,7 +2293,13 @@ public bool GetNews(OnGetNews callback, /// public class GetNewsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetNews Callback { get; set; } } diff --git a/Scripts/Services/Conversation-Experimental/Conversation-Experimental.cs b/Scripts/Services/Conversation-Experimental/Conversation-Experimental.cs index 089ceca4b..603669e6f 100755 --- a/Scripts/Services/Conversation-Experimental/Conversation-Experimental.cs +++ b/Scripts/Services/Conversation-Experimental/Conversation-Experimental.cs @@ -27,8 +27,8 @@ namespace IBM.Watson.DeveloperCloud.Services.ConversationExperimental.v1 { /// - /// This class wraps the Watson Conversation service. - /// Conversation Service + /// This class wraps the Watson Experimental Conversation service. + /// Experimental Conversation Service /// public class ConversationExperimental : IWatsonService { @@ -129,12 +129,13 @@ private void MessageResp(RESTConnector.Request req, RESTConnector.Response resp) #endregion #region IWatsonService implementation - + /// public string GetServiceID() { return SERVICE_ID; } + /// public void GetServiceStatus(ServiceStatus callback) { if (Config.Instance.FindCredentials(SERVICE_ID) != null) diff --git a/Scripts/Services/Conversation-Experimental/DataModels.cs b/Scripts/Services/Conversation-Experimental/DataModels.cs index c4b2ac9a5..01147f321 100755 --- a/Scripts/Services/Conversation-Experimental/DataModels.cs +++ b/Scripts/Services/Conversation-Experimental/DataModels.cs @@ -392,11 +392,17 @@ public class GoTo /// true if m return; otherwise, false. public bool m_return { get; set; } } - #endregion + #endregion - #region Version - public class Version + /// + /// The conversation service version. + /// + #region Version + public class Version { + /// + /// The version. + /// public const string VERSION = "2016-05-19"; } #endregion diff --git a/Scripts/Services/Conversation/Conversation.cs b/Scripts/Services/Conversation/Conversation.cs index 07581c342..a7fe83613 100755 --- a/Scripts/Services/Conversation/Conversation.cs +++ b/Scripts/Services/Conversation/Conversation.cs @@ -28,7 +28,7 @@ namespace IBM.Watson.DeveloperCloud.Services.Conversation.v1 { /// /// This class wraps the Watson Conversation service. - /// Conversation Service + /// Conversation Service /// public class Conversation : IWatsonService { @@ -194,12 +194,13 @@ private void MessageResp(RESTConnector.Request req, RESTConnector.Response resp) #endregion #region IWatsonService implementation - + /// public string GetServiceID() { return SERVICE_ID; } + /// public void GetServiceStatus(ServiceStatus callback) { if (Config.Instance.FindCredentials(SERVICE_ID) != null) diff --git a/Scripts/Services/Conversation/DataModels.cs b/Scripts/Services/Conversation/DataModels.cs index db0b5f207..8d579b4fd 100755 --- a/Scripts/Services/Conversation/DataModels.cs +++ b/Scripts/Services/Conversation/DataModels.cs @@ -394,9 +394,15 @@ public class GoTo } #endregion + /// + /// The conversation service version. + /// #region Version public class Version { + /// + /// The version. + /// public const string VERSION = "2016-07-11"; } #endregion diff --git a/Scripts/Services/DeepQA/DataModels.cs b/Scripts/Services/DeepQA/DataModels.cs index a3914843b..551b114c1 100644 --- a/Scripts/Services/DeepQA/DataModels.cs +++ b/Scripts/Services/DeepQA/DataModels.cs @@ -20,76 +20,199 @@ namespace IBM.Watson.DeveloperCloud.Services.DeepQA.v1 { + /// + /// The returned value. + /// [fsObject] public class Value { + /// + /// The value. + /// public string value { get; set; } }; + /// + /// The metadata of the answer. + /// [fsObject] public class MetaDataMap { + /// + /// The original file. + /// public string originalFile { get; set; } + /// + /// The title. + /// public string title { get; set; } + /// + /// The corpus name. + /// public string corpusName { get; set; } + /// + /// The file name. + /// public string fileName { get; set; } + /// + /// The document number. + /// public string DOCNO { get; set; } + /// + /// The corpus and document number. + /// public string CorpusPlusDocno { get; set; } }; + /// + /// The evidence of the answer. + /// [fsObject] public class Evidence { + /// + /// The value. + /// public string value { get; set; } + /// + /// The text. + /// public string text { get; set; } + /// + /// The identifier. + /// public string id { get; set; } + /// + /// The title. + /// public string title { get; set; } + /// + /// The document. + /// public string document { get; set; } + /// + /// The copyright. + /// public string copyright { get; set; } + /// + /// The terms of use. + /// public string termsOfUse { get; set; } + /// + /// The metadata map. + /// public MetaDataMap metadataMap { get; set; } }; + /// + /// Synonym of an answer. + /// [fsObject] public class Synonym { + /// + /// Is the synonym chosen? + /// public bool isChosen { get; set; } + /// + /// The synonym value. + /// public string value { get; set; } + /// + /// The synonym weight. + /// public double weight { get; set; } }; + /// + /// Synonym set. + /// [fsObject] public class SynSet { + /// + /// The synset name. + /// public string name { get; set; } + /// + /// The synonyms. + /// public Synonym[] synSet { get; set; } }; + /// + /// Synonym list. + /// [fsObject] public class SynonymList { + /// + /// The part of speech. + /// public string partOfSpeech { get; set; } + /// + /// The valuse. + /// public string value { get; set; } + /// + /// The lemma. + /// public string lemma { get; set; } + /// + /// The synsets. + /// public SynSet[] synSet { get; set; } }; + /// + /// The evidence request. + /// [fsObject] public class EvidenceRequest { + /// + /// The items. + /// public long items { get; set; } + /// + /// The profile. + /// public string profile { get; set; } }; + /// + /// The answer. + /// [fsObject] public class Answer { + /// + /// The answer identifier. + /// public long id { get; set; } + /// + /// The answer text. + /// public string text { get; set; } + /// + /// The pipeline. + /// public string pipeline { get; set; } + /// + /// The formatted text. + /// public string formattedText { get; set; } + /// + /// The confidence. + /// public double confidence { get; set; } + /// + /// The evidence. + /// public Evidence[] evidence { get; set; } + /// + /// The entity types. + /// public string[] entityTypes { get; set; } private static string CleanInnerText(string text) @@ -101,22 +224,47 @@ private static string CleanInnerText(string text) return text.Trim(new char[] { '\n', '\r', '\t', ' ' }); } + /// + /// Answer cell. + /// [fsObject] public class Cell { + /// + /// The cell value. + /// public string Value { get; set; } - public int ColSpan { get; set; } // how many colums does this cell span, by default just 1.. + /// + /// The column span. + /// + public int ColSpan { get; set; } + /// + /// Is this cell highlighted? + /// public bool Highlighted { get; set; } }; + + /// + /// Answer row. + /// [fsObject] public class Row { + /// + /// The row columns. + /// public Cell[] columns { get; set; } }; + /// + /// Answer table. + /// [fsObject] public class Table { + /// + /// The table rows. + /// public Row[] rows { get; set; } }; @@ -180,69 +328,216 @@ public Table[] ExtractTables(string answer) return null; } }; + + /// + /// The word slots. + /// [fsObject] public class Slots { + /// + /// The pred. + /// public string pred { get; set; } + /// + /// The subj. + /// public string subj { get; set; } + /// + /// The objprep. + /// public string objprep { get; set; } + /// + /// The psubj. + /// public string psubj { get; set; } }; + + /// + /// The word. + /// [fsObject] public class Word { + /// + /// The slots. + /// public Slots compSlotParseNodes { get; set; } + /// + /// The slot name. + /// public string slotname { get; set; } + /// + /// The word text. + /// public string wordtext { get; set; } + /// + /// The slot name options. + /// public string slotnameoptions { get; set; } + /// + /// The word sense. + /// public string wordsense { get; set; } + /// + /// The numeric sense. + /// public string numericsense { get; set; } + /// + /// The seqno. + /// public string seqno { get; set; } + /// + /// The word begin. + /// public string wordbegin { get; set; } + /// + /// The frame begin. + /// public string framebegin { get; set; } + /// + /// The frame end. + /// public string frameend { get; set; } + /// + /// The word end. + /// public string wordend { get; set; } + /// + /// The features. + /// public string features { get; set; } + /// + /// The lMods. + /// public Word[] lmods { get; set; } + /// + /// The rMods. + /// public Word[] rmods { get; set; } }; + + /// + /// The parse tree. + /// [fsObject] public class ParseTree : Word { + /// + /// The parse score. + /// public string parseScore { get; set; } }; + /// + /// The question. + /// [fsObject] public class Question { + /// + /// The qClassList. + /// public Value[] qclasslist { get; set; } + /// + /// The focus list. + /// public Value[] focuslist { get; set; } + /// + /// The lat list. + /// public Value[] latlist { get; set; } + /// + /// The evidence list. + /// public Evidence[] evidencelist { get; set; } + /// + /// The synonyms list. + /// public SynonymList[] synonymList { get; set; } + /// + /// The disambiguated entities. + /// public string[] disambiguatedEntities { get; set; } + /// + /// The xsgtopparses. + /// public ParseTree[] xsgtopparses { get; set; } + /// + /// The cas XML. + /// public string casXml { get; set; } + /// + /// The pipeline id. + /// public string pipelineid { get; set; } + /// + /// The formatted answer. + /// public bool formattedAnswer { get; set; } + /// + /// The selected processing components. + /// public string selectedProcessingComponents { get; set; } + /// + /// The category. + /// public string category { get; set; } + /// + /// The items. + /// public long items { get; set; } + /// + /// The status. + /// public string status { get; set; } + /// + /// The identifier. + /// public string id { get; set; } + /// + /// The question text. + /// public string questionText { get; set; } + /// + /// The evidence request. + /// public EvidenceRequest evidenceRequest { get; set; } + /// + /// The answers. + /// public Answer[] answers { get; set; } + /// + /// The error notifications. + /// public string[] errorNotifications { get; set; } + /// + /// The passthru. + /// public string passthru { get; set; } - + /// + /// The question identifier. + /// public string questionId { get; set; } // local cache ID }; + + /// + /// The question class. + /// [fsObject] public class QuestionClass { + /// + /// Out of domain. + /// public string out_of_domain { get; set; } + /// + /// The question. + /// public string question { get; set; } + /// + /// The domain. + /// public string domain { get; set; } }; /// @@ -251,7 +546,13 @@ public class QuestionClass [fsObject] public class Response { + /// + /// The questions. + /// public Question question { get; set; } + /// + /// The question classes. + /// public QuestionClass[] questionClasses { get; set; } }; @@ -261,6 +562,9 @@ public class Response [fsObject] public class ResponseList { + /// + /// The responses. + /// public Response[] responses { get; set; } }; } diff --git a/Scripts/Services/DeepQA/DeepQA.cs b/Scripts/Services/DeepQA/DeepQA.cs index 75f5e1b9e..a6ce99296 100644 --- a/Scripts/Services/DeepQA/DeepQA.cs +++ b/Scripts/Services/DeepQA/DeepQA.cs @@ -27,7 +27,7 @@ namespace IBM.Watson.DeveloperCloud.Services.DeepQA.v1 { /// - /// The DeepQA provides an abstraction for the deepQa/ services of Watson. + /// The DeepQA provides an abstraction for the DeepQA services of Watson. /// public class DeepQA : IWatsonService { @@ -73,7 +73,7 @@ public void FlushAnswerCache() } /// - /// + /// Find a question in the question cache. /// /// /// diff --git a/Scripts/Services/Dialog/Dialog.cs b/Scripts/Services/Dialog/Dialog.cs index db8f08c48..c350c84cf 100644 --- a/Scripts/Services/Dialog/Dialog.cs +++ b/Scripts/Services/Dialog/Dialog.cs @@ -28,11 +28,11 @@ namespace IBM.Watson.DeveloperCloud.Services.Dialog.v1 { - /// - /// This class wraps the Watson Dialog service. - /// Dialog Service - /// - public class Dialog : IWatsonService + /// + /// This class wraps the Watson Dialog service. + /// Dialog Service + /// + public class Dialog : IWatsonService { #region Public Types /// diff --git a/Scripts/Services/DocumentConversion.meta b/Scripts/Services/DocumentConversion.meta old mode 100755 new mode 100644 diff --git a/Scripts/Services/DocumentConversion/DataModels.cs b/Scripts/Services/DocumentConversion/DataModels.cs index 70d5764f6..b4e920194 100755 --- a/Scripts/Services/DocumentConversion/DataModels.cs +++ b/Scripts/Services/DocumentConversion/DataModels.cs @@ -109,6 +109,9 @@ public class AnswerUnit public Content[] content { get; set; } } + /// + /// Document content. + /// [fsObject] public class Content { @@ -143,8 +146,17 @@ public class Warning /// public class ConversionTarget { + /// + /// Answer units conversion target. + /// public const string ANSWER_UNITS = "{\"conversion_target\": \"answer_units\"}"; + /// + /// Normalized html conversion target. + /// public const string NORMALIZED_HTML = "{\"conversion_target\": \"normalized_html\"}"; + /// + /// Normalized text conversion target. + /// public const string NORMALIZED_TEXT = "{\"conversion_target\": \"normalized_text\"}"; } @@ -153,6 +165,9 @@ public class ConversionTarget /// public class Version { + /// + /// The version. + /// public const string DOCUMENT_CONVERSION = "2015-12-15"; } } diff --git a/Scripts/Services/DocumentConversion/DocumentConversion.cs b/Scripts/Services/DocumentConversion/DocumentConversion.cs index 24fe81c29..f69c36540 100755 --- a/Scripts/Services/DocumentConversion/DocumentConversion.cs +++ b/Scripts/Services/DocumentConversion/DocumentConversion.cs @@ -28,7 +28,11 @@ namespace IBM.Watson.DeveloperCloud.Services.DocumentConversion.v1 { - public class DocumentConversion : IWatsonService + /// + /// This class wraps the Document Conversion service. + /// Document Conversion Service + /// + public class DocumentConversion : IWatsonService { #region Private Data private const string SERVICE_ID = "DocumentConversionV1"; @@ -37,18 +41,33 @@ public class DocumentConversion : IWatsonService #region ConvertDocument private const string FUNCTION_CONVERT_DOCUMENT = "/v1/convert_document"; + /// + /// The OnConvertDocument callback. + /// + /// + /// public delegate void OnConvertDocument(ConvertedDocument resp, string data); + /// /// The delegate for loading a file, used by TrainClassifier(). /// /// The filename to load. /// Should return a byte array of the file contents or null of failure. public delegate byte[] LoadFileDelegate(string filename); + /// /// Set this property to overload the internal file loading of this class. /// public LoadFileDelegate LoadFile { get; set; } + /// + /// Convert document to use in other Watson services. + /// + /// + /// + /// + /// + /// public bool ConvertDocument(OnConvertDocument callback, string documentPath, string conversionTarget = ConversionTarget.ANSWER_UNITS, string data = null) { if (callback == null) diff --git a/Scripts/Services/LanguageTranslation/LanguageTranslation.cs b/Scripts/Services/LanguageTranslation/LanguageTranslation.cs index 7eda5129f..80e48f653 100755 --- a/Scripts/Services/LanguageTranslation/LanguageTranslation.cs +++ b/Scripts/Services/LanguageTranslation/LanguageTranslation.cs @@ -27,11 +27,11 @@ namespace IBM.Watson.DeveloperCloud.Services.LanguageTranslation.v1 { - /// - /// This class wraps the Language Translation service. - /// Language Translation Service - /// - public class LanguageTranslation : IWatsonService + /// + /// This class wraps the Language Translation service. + /// Language Translation Service + /// + public class LanguageTranslation : IWatsonService { #region Public Types /// diff --git a/Scripts/Services/LanguageTranslator/LanguageTranslator.cs b/Scripts/Services/LanguageTranslator/LanguageTranslator.cs index 270693109..81911520b 100644 --- a/Scripts/Services/LanguageTranslator/LanguageTranslator.cs +++ b/Scripts/Services/LanguageTranslator/LanguageTranslator.cs @@ -27,11 +27,11 @@ namespace IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v1 { - /// - /// This class wraps the Language Translator service. - /// Language Translator Service - /// - public class LanguageTranslator : IWatsonService + /// + /// This class wraps the Language Translator service. + /// Language Translator Service + /// + public class LanguageTranslator : IWatsonService { #region Public Types /// diff --git a/Scripts/Services/NaturalLanguageClassifier/NaturalLanguageClassifier.cs b/Scripts/Services/NaturalLanguageClassifier/NaturalLanguageClassifier.cs index 625e0065d..afd989b19 100644 --- a/Scripts/Services/NaturalLanguageClassifier/NaturalLanguageClassifier.cs +++ b/Scripts/Services/NaturalLanguageClassifier/NaturalLanguageClassifier.cs @@ -26,11 +26,11 @@ namespace IBM.Watson.DeveloperCloud.Services.NaturalLanguageClassifier.v1 { - /// - /// This class wraps the Natural Language Classifier service. - /// Natural Language Classifier Service - /// - public class NaturalLanguageClassifier : IWatsonService + /// + /// This class wraps the Natural Language Classifier service. + /// Natural Language Classifier Service + /// + public class NaturalLanguageClassifier : IWatsonService { #region Public Types /// diff --git a/Scripts/Services/PersonalityInsights/DataModels.cs b/Scripts/Services/PersonalityInsights/DataModels.cs index cfcbea4d5..d72b75123 100644 --- a/Scripts/Services/PersonalityInsights/DataModels.cs +++ b/Scripts/Services/PersonalityInsights/DataModels.cs @@ -16,244 +16,261 @@ */ using FullSerializer; +using UnityEngine; +using System.Collections; namespace IBM.Watson.DeveloperCloud.Services.PersonalityInsights.v2 { - using UnityEngine; - using System.Collections; + /// + /// The profile result from Personality Insights. + /// + [fsObject] + public class Profile + { + /// + /// Detailed results for a specific characteristic of the input text. + /// + /// The tree. + public TraitTreeNode tree { get; set; } + + /// + /// The unique user identifier for which these characteristics were computed. The value is derived from the userid field of the input ContentItem objects. The field is passed as-is from JSON input. Sanitize the contents of the field before displaying them to prevent cross-site scripting attacks. + /// + /// The identifier. + public string id { get; set; } + + /// + /// The source identifier for which these characteristics were computed. The value is derived from the sourceid field of the input ContentItem objects. The field is passed as-is from JSON input. Sanitize the contents of the field before displaying them to prevent cross-site scripting attacks. + /// + /// The source. + public string source { get; set; } + + /// + /// The language model that was used to process the input; for example, en. + /// + /// The processed lang. + public string processed_lang { get; set; } + + /// + /// The number of words that were found in the input. + /// + /// The word count. + public string word_count { get; set; } + + /// + /// When guidance is appropriate, a string that provides a message that indicates the number of words found and where that value falls in the range of required or suggested number of words. + /// + /// The word count message. + public string word_count_message { get; set; } + + /// + /// Warning messages associated with the input text submitted with the request. The array is empty if the input generated no warnings. + /// + /// The warnings. + public Warning[] warnings { get; set; } + } + + /// + /// The trait tree node of the trait tree. + /// + [fsObject] + public class TraitTreeNode + { + /// + /// The unique identifier of the characteristic to which the results pertain. + /// + /// The identifier. + public string id { get; set; } + + /// + /// The user-visible name of the characteristic. + /// + /// The name. + public string name { get; set; } + + /// + /// The category of the characteristic: personality, needs, values, or behavior (for temporal data). + /// + /// The category. + public string category { get; set; } + + /// + /// For personality, needs, and values characteristics, the normalized percentile score for the characteristic. The range is 0 to 1. For example, if the percentage for Openness is 0.25, the author scored in the 25th percentile; the author is more open than 24% of the population and less open than 74% of the population. For temporal behavior characteristics, the percentage of timestamped data that occurred during that day or hour. + /// + /// The percentage. + public string percentage { get; set; } + + /// + /// For personality, needs, and values characteristics, indicates the sampling error of the percentage based on the number of words in the input text. The range is 0 to 1. The number defines a 95% confidence interval around the percentage. For example, if the sampling error is 4% and the percentage is 61%, it is 95% likely that the actual percentage value is between 57% and 65% if more words are given. + /// + /// The sampling error. + public string sampling_error { get; set; } + + /// + /// For personality, needs, and values characteristics, the raw score for the characteristic. A positive or negative score indicates more or less of the characteristic; zero indicates neutrality or no evidence for a score. The raw score is computed based on the input and the service model; it is not normalized or compared with a sample population. The raw score enables comparison of the results against a different sampling population and with a custom normalization approach. + /// + /// The raw score. + public string raw_score { get; set; } + + /// + /// For personality, needs, and values characteristics, indicates the sampling error of the raw score based on the number of words in the input. The practical range is 0 to 1. The number defines a 95% confidence interval around the raw score. For example, if the raw sampling error is 5% and the raw score is 65%, it is 95% likely that the actual raw score is between 60% and 70% if more words are given. + /// + /// The raw sampling error. + public string raw_sampling_error { get; set; } + + /// + /// Recursive array of more detailed characteristics inferred from the input text. + /// + /// The children. + public TraitTreeNode[] children { get; set; } + } + + /// + /// The warning object. + /// + [fsObject] + public class Warning + { + /// + /// The identifier of the warning message, one of WORD_COUNT_MESSAGE or JSON_AS_TEXT. + /// + /// The identifier. + public string id { get; set; } + + /// + /// The message associated with the id. For WORD_COUNT_MESSAGE, "There were [number] words in the input. We need a minimum of 3,500, preferably 6,000 or more, to compute statistically significant estimates"; for JSON_AS_TEXT, "Request input was processed as text/plain as indicated, however detected a JSON input. Did you mean application/json?". + /// + /// The message. + public string message { get; set; } + } + + /// + /// Holder for content items. + /// + [fsObject] + public class ContentListContainer + { + /// + /// An array of content items for personality insight profile request. + /// + /// The content items. + public ContentItem[] contentItems { get; set; } + } + + /// + /// The content item. + /// + [fsObject] + public class ContentItem + { + /// + /// Unique identifier for this content item. + /// + /// The identifier. + public string id { get; set; } + + /// + /// Unique identifier for the author of this content. + /// + /// The userid. + public string userid { get; set; } + + /// + /// Identifier for the source of this content, for example, blog123 or twitter. + /// + /// The sourceid. + public string sourceid { get; set; } + + /// + /// Timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data. + /// + /// The created. + public string created { get; set; } + + /// + /// Timestamp that identifies when this content was last updated. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data. + /// + /// The updated. + public string updated { get; set; } + + /// + /// MIME type of the content, for example, text/plain (the default) or text/html. The tags are stripped from HTML content before it is analyzed; other MIME types are processed as is. + /// + /// The contenttype. + public string contenttype { get; set; } + + /// + /// Language identifier (two-letter ISO 639-1 identifier) for the input text: ar (Arabic), en (English), es (Spanish), or ja (Japanese). The default is English. Regional variants are treated as their parent language; for example, en-US is interpreted as en. A language specified with the Content-Type header overrides the value of this parameter; any content items that specify a different language are ignored. Omit the Content-Type header to base the language on the most prevalent specification among the content items; again, content items that specify a different language are ignored. You can specify any combination of languages for the input text and the response (Accept-Language). + /// + /// The language. + public string language { get; set; } + + /// + /// Content to be analyzed. Up to 20 MB of content is supported. + /// + /// The content. + public string content { get; set; } + + /// + /// Unique ID of the parent content item for this item. Used to identify hierarchical relationships between posts/replies, messages/replies, and so on. + /// + /// The parentid. + public string parentid { get; set; } + + /// + /// Indicates whether this content item is a reply to another content item. + /// + /// true if reply; otherwise, false. + public bool reply { get; set; } + + /// + /// Indicates whether this content item is a forwarded/copied version of another content item. + /// + /// true if forward; otherwise, false. + public bool forward { get; set; } + } + + /// + /// The content type. Either text, html or json. + /// + public class ContentType + { + /// + /// Mime type for plain text. + /// + public const string TEXT_PLAIN = "text/plain"; + + /// + /// Mime type for HTML. + /// + public const string TEXT_HTML = "text/html"; + + /// + /// Mime type for json. + /// + public const string APPLICATION_JSON = "application/json"; + } - public class DataModels : MonoBehaviour + /// + /// The content language. Either English, Arabic, Spanish or Japanese. + /// + public class Language { - [fsObject] - public class Profile - { - /// - /// Detailed results for a specific characteristic of the input text. - /// - /// The tree. - public TraitTreeNode tree { get; set; } - - /// - /// The unique user identifier for which these characteristics were computed. The value is derived from the userid field of the input ContentItem objects. The field is passed as-is from JSON input. Sanitize the contents of the field before displaying them to prevent cross-site scripting attacks. - /// - /// The identifier. - public string id { get; set; } - - /// - /// The source identifier for which these characteristics were computed. The value is derived from the sourceid field of the input ContentItem objects. The field is passed as-is from JSON input. Sanitize the contents of the field before displaying them to prevent cross-site scripting attacks. - /// - /// The source. - public string source { get; set; } - - /// - /// The language model that was used to process the input; for example, en. - /// - /// The processed lang. - public string processed_lang { get; set; } - - /// - /// The number of words that were found in the input. - /// - /// The word count. - public string word_count { get; set; } - - /// - /// When guidance is appropriate, a string that provides a message that indicates the number of words found and where that value falls in the range of required or suggested number of words. - /// - /// The word count message. - public string word_count_message { get; set; } - - /// - /// Warning messages associated with the input text submitted with the request. The array is empty if the input generated no warnings. - /// - /// The warnings. - public Warning[] warnings { get; set; } - } - - [fsObject] - public class TraitTreeNode - { - /// - /// The unique identifier of the characteristic to which the results pertain. - /// - /// The identifier. - public string id { get; set; } - - /// - /// The user-visible name of the characteristic. - /// - /// The name. - public string name { get; set; } - - /// - /// The category of the characteristic: personality, needs, values, or behavior (for temporal data). - /// - /// The category. - public string category { get; set; } - - /// - /// For personality, needs, and values characteristics, the normalized percentile score for the characteristic. The range is 0 to 1. For example, if the percentage for Openness is 0.25, the author scored in the 25th percentile; the author is more open than 24% of the population and less open than 74% of the population. For temporal behavior characteristics, the percentage of timestamped data that occurred during that day or hour. - /// - /// The percentage. - public string percentage { get; set; } - - /// - /// For personality, needs, and values characteristics, indicates the sampling error of the percentage based on the number of words in the input text. The range is 0 to 1. The number defines a 95% confidence interval around the percentage. For example, if the sampling error is 4% and the percentage is 61%, it is 95% likely that the actual percentage value is between 57% and 65% if more words are given. - /// - /// The sampling error. - public string sampling_error { get; set; } - - /// - /// For personality, needs, and values characteristics, the raw score for the characteristic. A positive or negative score indicates more or less of the characteristic; zero indicates neutrality or no evidence for a score. The raw score is computed based on the input and the service model; it is not normalized or compared with a sample population. The raw score enables comparison of the results against a different sampling population and with a custom normalization approach. - /// - /// The raw score. - public string raw_score { get; set; } - - /// - /// For personality, needs, and values characteristics, indicates the sampling error of the raw score based on the number of words in the input. The practical range is 0 to 1. The number defines a 95% confidence interval around the raw score. For example, if the raw sampling error is 5% and the raw score is 65%, it is 95% likely that the actual raw score is between 60% and 70% if more words are given. - /// - /// The raw sampling error. - public string raw_sampling_error { get; set; } - - /// - /// Recursive array of more detailed characteristics inferred from the input text. - /// - /// The children. - public TraitTreeNode[] children { get; set; } - } - - [fsObject] - public class Warning - { - /// - /// The identifier of the warning message, one of WORD_COUNT_MESSAGE or JSON_AS_TEXT. - /// - /// The identifier. - public string id { get; set; } - - /// - /// The message associated with the id. For WORD_COUNT_MESSAGE, "There were words in the input. We need a minimum of 3,500, preferably 6,000 or more, to compute statistically significant estimates"; for JSON_AS_TEXT, "Request input was processed as text/plain as indicated, however detected a JSON input. Did you mean application/json?". - /// - /// The message. - public string message { get; set; } - } - - [fsObject] - public class ContentListContainer - { - /// - /// An array of content items for personality insight profile request. - /// - /// The content items. - public ContentItem[] contentItems { get; set; } - } - - [fsObject] - public class ContentItem - { - /// - /// Unique identifier for this content item. - /// - /// The identifier. - public string id { get; set; } - - /// - /// Unique identifier for the author of this content. - /// - /// The userid. - public string userid { get; set; } - - /// - /// Identifier for the source of this content, for example, blog123 or twitter. - /// - /// The sourceid. - public string sourceid { get; set; } - - /// - /// Timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data. - /// - /// The created. - public string created { get; set; } - - /// - /// Timestamp that identifies when this content was last updated. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data. - /// - /// The updated. - public string updated { get; set; } - - /// - /// MIME type of the content, for example, text/plain (the default) or text/html. The tags are stripped from HTML content before it is analyzed; other MIME types are processed as is. - /// - /// The contenttype. - public string contenttype { get; set; } - - /// - /// Language identifier (two-letter ISO 639-1 identifier) for the input text: ar (Arabic), en (English), es (Spanish), or ja (Japanese). The default is English. Regional variants are treated as their parent language; for example, en-US is interpreted as en. A language specified with the Content-Type header overrides the value of this parameter; any content items that specify a different language are ignored. Omit the Content-Type header to base the language on the most prevalent specification among the content items; again, content items that specify a different language are ignored. You can specify any combination of languages for the input text and the response (Accept-Language). - /// - /// The language. - public string language { get; set; } - - /// - /// Content to be analyzed. Up to 20 MB of content is supported. - /// - /// The content. - public string content { get; set; } - - /// - /// Unique ID of the parent content item for this item. Used to identify hierarchical relationships between posts/replies, messages/replies, and so on. - /// - /// The parentid. - public string parentid { get; set; } - - /// - /// Indicates whether this content item is a reply to another content item. - /// - /// true if reply; otherwise, false. - public bool reply { get; set; } - - /// - /// Indicates whether this content item is a forwarded/copied version of another content item. - /// - /// true if forward; otherwise, false. - public bool forward { get; set; } - } - - public class ContentType - { - /// - /// Mime type for plain text. - /// - public const string TEXT_PLAIN = "text/plain"; - - /// - /// Mime type for HTML. - /// - public const string TEXT_HTML = "text/html"; - - /// - /// Mime type for json. - /// - public const string APPLICATION_JSON = "application/json"; - } - - public class Language - { - /// - /// English. - /// - public const string ENGLISH = "en"; - /// - /// Arabic. - /// - public const string ARABIC = "ar"; - /// - /// Spanish. - /// - public const string SPANISH = "es"; - /// - /// Japanese - /// - public const string JAPANESE = "ja"; - } + /// + /// English. + /// + public const string ENGLISH = "en"; + /// + /// Arabic. + /// + public const string ARABIC = "ar"; + /// + /// Spanish. + /// + public const string SPANISH = "es"; + /// + /// Japanese + /// + public const string JAPANESE = "ja"; } } diff --git a/Scripts/Services/PersonalityInsights/PersonalityInsights.cs b/Scripts/Services/PersonalityInsights/PersonalityInsights.cs index 865f4672c..08359265e 100755 --- a/Scripts/Services/PersonalityInsights/PersonalityInsights.cs +++ b/Scripts/Services/PersonalityInsights/PersonalityInsights.cs @@ -27,7 +27,11 @@ namespace IBM.Watson.DeveloperCloud.Services.PersonalityInsights.v2 { - public class PersonalityInsights : IWatsonService + /// + /// This class wraps the Personality Insights service. + /// Personality Insights Service + /// + public class PersonalityInsights : IWatsonService { #region Private Data private const string SERVICE_ID = "PersonalityInsightsV2"; @@ -40,7 +44,7 @@ public class PersonalityInsights : IWatsonService /// /// On get profile delegate. /// - public delegate void OnGetProfile(DataModels.Profile profile, string data); + public delegate void OnGetProfile(Profile profile, string data); /// /// Uses Personality Insights to get the source profile. @@ -56,10 +60,10 @@ public class PersonalityInsights : IWatsonService /// If set to true headers. /// Data. public bool GetProfile(OnGetProfile callback, string source, - string contentType = DataModels.ContentType.TEXT_PLAIN, - string contentLanguage = DataModels.Language.ENGLISH, - string accept = DataModels.ContentType.APPLICATION_JSON, - string acceptLanguage = DataModels.Language.ENGLISH, + string contentType = ContentType.TEXT_PLAIN, + string contentLanguage = Language.ENGLISH, + string accept = ContentType.APPLICATION_JSON, + string acceptLanguage = Language.ENGLISH, bool includeRaw = false, bool headers = false, string data = default(string)) @@ -105,13 +109,19 @@ public bool GetProfile(OnGetProfile callback, string source, /// public class GetProfileRequest:RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetProfile Callback { get; set; } } private void GetProfileResponse(RESTConnector.Request req, RESTConnector.Response resp) { - DataModels.Profile response = new DataModels.Profile(); + Profile response = new Profile(); if (resp.Success) { try @@ -164,11 +174,11 @@ public CheckServiceStatus(PersonalityInsights service, ServiceStatus callback ) m_Service = service; m_Callback = callback; string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json"; - if(!m_Service.GetProfile(OnGetProfile, dataPath, DataModels.ContentType.TEXT_PLAIN, DataModels.Language.ENGLISH)) + if(!m_Service.GetProfile(OnGetProfile, dataPath, ContentType.TEXT_PLAIN, Language.ENGLISH)) m_Callback(SERVICE_ID, false); } - private void OnGetProfile(DataModels.Profile resp , string data) + private void OnGetProfile(Profile resp , string data) { if(m_Callback != null ) m_Callback(SERVICE_ID, resp != null); diff --git a/Scripts/Services/RetrieveAndRank/DataModels.cs b/Scripts/Services/RetrieveAndRank/DataModels.cs index 2e487dfc6..79961f3ec 100755 --- a/Scripts/Services/RetrieveAndRank/DataModels.cs +++ b/Scripts/Services/RetrieveAndRank/DataModels.cs @@ -220,6 +220,9 @@ public class IndexResponse public ResponseHeader responseHeader { get; set; } } + /// + /// The query parameters. + /// [fsObject] public class QueryParams { diff --git a/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs b/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs index 87dc8f79a..79e794a06 100755 --- a/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs +++ b/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs @@ -28,7 +28,11 @@ namespace IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1 { - public class RetrieveAndRank : IWatsonService + /// + /// This class wraps the Retrieve and Rank service. + /// Retrieve and Rank Service + /// + public class RetrieveAndRank : IWatsonService { #region Private Data private const string SERVICE_ID = "RetrieveAndRankV1"; @@ -121,7 +125,13 @@ public class RetrieveAndRank : IWatsonService /// public class GetClustersRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetClusters Callback { get; set; } } @@ -200,7 +210,13 @@ private void OnGetClustersResponse(RESTConnector.Request req, RESTConnector.Resp /// public class CreateClusterRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnCreateCluster Callback { get; set; } } @@ -281,8 +297,17 @@ private void OnCreateClusterResponse(RESTConnector.Request req, RESTConnector.Re /// public class DeleteClusterRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The cluster identifier. + /// public string ClusterID { get; set; } + /// + /// The callback. + /// public OnDeleteCluster Callback { get; set; } } @@ -339,8 +364,17 @@ private void OnDeleteClusterResponse(RESTConnector.Request req, RESTConnector.Re /// public class GetClusterRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The cluster identifier. + /// public string ClusterID { get; set; } + /// + /// The callback. + /// public OnGetCluster Callback { get; set; } } @@ -379,9 +413,21 @@ private void OnGetClusterResponse(RESTConnector.Request req, RESTConnector.Respo #endregion #region ListClusterConfigs + /// + /// Get Cluster Configs callback delegate. + /// + /// + /// public delegate void OnGetClusterConfigs(SolrConfigList resp, string data); - public bool GetClusterConfigs(OnGetClusterConfigs callback, string clusterID, string customData = default(string)) + /// + /// Returns a configuration .zip file for a cluster. + /// + /// + /// + /// + /// + public bool GetClusterConfigs(OnGetClusterConfigs callback, string clusterID, string customData = default(string)) { if (callback == null) throw new ArgumentNullException("callback"); @@ -401,13 +447,30 @@ private void OnGetClusterResponse(RESTConnector.Request req, RESTConnector.Respo return connector.Send(req); } + /// + /// The GetClusterConfigs request. + /// public class GetClusterConfigsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } - public string ClusterID { get; set; } + /// + /// The cluster identifier. + /// + public string ClusterID { get; set; } + /// + /// The callback. + /// public OnGetClusterConfigs Callback { get; set; } } + /// + /// The OnGetClusterConfigs response. + /// + /// + /// private void OnGetClusterConfigsResponse(RESTConnector.Request req, RESTConnector.Response resp) { SolrConfigList configData = new SolrConfigList(); @@ -485,9 +548,21 @@ private void OnGetClusterConfigsResponse(RESTConnector.Request req, RESTConnecto /// public class DeleteClusterConfigRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The cluster identifier. + /// public string ClusterID { get; set; } + /// + /// The config identifier. + /// public string ConfigID { get; set; } + /// + /// The callback. + /// public OnDeleteClusterConfig Callback { get; set; } } @@ -540,9 +615,21 @@ private void OnDeleteClusterConfigResponse(RESTConnector.Request req, RESTConnec private class GetClusterConfigRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The cluster identifier. + /// public string ClusterID { get; set; } + /// + /// The confguration name. + /// public string ConfigName { get; set; } + /// + /// The callback. + /// public OnGetClusterConfig Callback { get; set; } } @@ -662,9 +749,21 @@ public void SaveConfig(OnSaveClusterConfig callback, byte[] configData, string c private class UploadClusterConfigRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The cluster identifier. + /// public string ClusterID { get; set; } + /// + /// The configuration name. + /// public string ConfigName { get; set; } + /// + /// The callback. + /// public OnUploadClusterConfig Callback { get; set; } } @@ -769,7 +868,13 @@ private void UploadClusterConfigResponse(RESTConnector.Request req, RESTConnecto /// public class CollectionRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnCollections Callback { get; set; } /// /// Cluster ID required for all actions. @@ -885,10 +990,25 @@ private void OnForwardCollectionRequestResponse(RESTConnector.Request req, RESTC /// public class IndexDocumentsRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The index data path. + /// public string IndexDataPath { get; set; } + /// + /// The cluster identifier to use. + /// public string ClusterID { get; set; } + /// + /// The collection name to use. + /// public string CollectionName { get; set; } + /// + /// The callback. + /// public OnIndexDocuments Callback { get; set; } } @@ -958,7 +1078,7 @@ private void OnIndexDocumentsResponse(RESTConnector.Request req, RESTConnector.R SearchRequest req = new SearchRequest(); req.Callback = callback; req.ClusterID = clusterID; - req.Collectionname = collectionName; + req.CollectionName = collectionName; req.Query = query; req.Fl = fl; req.Data = customData; @@ -990,11 +1110,29 @@ private void OnIndexDocumentsResponse(RESTConnector.Request req, RESTConnector.R /// public class SearchRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The cluster identifier to use. + /// public string ClusterID { get; set; } - public string Collectionname { get; set; } + /// + /// The collectionName to use. + /// + public string CollectionName { get; set; } + /// + /// The query. + /// public string Query { get; set; } + /// + /// The query fields to use. + /// public string[] Fl { get; set; } + /// + /// The callback. + /// public OnSearch Callback { get; set; } } @@ -1064,7 +1202,13 @@ private void OnSearchResponse(RESTConnector.Request req, RESTConnector.Response /// public class GetRankersRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The callback. + /// public OnGetRankers Callback { get; set; } } @@ -1164,9 +1308,21 @@ private void OnGetRankersResponse(RESTConnector.Request req, RESTConnector.Respo /// public class CreateRankerRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The ranker name. + /// public string Name { get; set; } + /// + /// The ranker training data path. + /// public string TrainingDataPath { get; set; } + /// + /// The callback. + /// public OnCreateRanker Callback { get; set; } } @@ -1265,9 +1421,21 @@ private void OnCreateRankerResponse(RESTConnector.Request req, RESTConnector.Res /// public class RankRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The ranker identifier. + /// public string RankerID { get; set; } + /// + /// The search results path. + /// public string SearchResultsPath { get; set; } + /// + /// The callback. + /// public OnRank Callback { get; set; } } @@ -1348,8 +1516,17 @@ private void OnRankResponse(RESTConnector.Request req, RESTConnector.Response re /// public class DeleteRankerRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The ranker identifier. + /// public string RankerID { get; set; } + /// + /// The callback. + /// public OnDeleteRanker Callback { get; set; } } @@ -1405,8 +1582,17 @@ private void OnDeleteRankerResponse(RESTConnector.Request req, RESTConnector.Res /// public class GetRankerRequest : RESTConnector.Request { + /// + /// Custom data. + /// public string Data { get; set; } + /// + /// The ranker identifier. + /// public string RankerID { get; set; } + /// + /// The callback. + /// public OnGetRanker Callback { get; set; } } diff --git a/Scripts/Services/SpeechToText/SpeechToText.cs b/Scripts/Services/SpeechToText/SpeechToText.cs index 966620444..f5688eeb1 100644 --- a/Scripts/Services/SpeechToText/SpeechToText.cs +++ b/Scripts/Services/SpeechToText/SpeechToText.cs @@ -30,11 +30,11 @@ namespace IBM.Watson.DeveloperCloud.Services.SpeechToText.v1 { - /// - /// This class wraps the Watson SpeechToText service. - /// SpeechToText Service - /// - public class SpeechToText : IWatsonService + /// + /// This class wraps the Watson Speech to Text service. + /// Speech to Text Service + /// + public class SpeechToText : IWatsonService { #region Constants /// diff --git a/Scripts/Services/TextToSpeech/TextToSpeech.cs b/Scripts/Services/TextToSpeech/TextToSpeech.cs index 6aabe3206..b53fdc62a 100644 --- a/Scripts/Services/TextToSpeech/TextToSpeech.cs +++ b/Scripts/Services/TextToSpeech/TextToSpeech.cs @@ -27,11 +27,11 @@ namespace IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1 { - /// - /// This class wraps the TextToSpeech service. - /// TextToSpeech Service - /// - public class TextToSpeech : IWatsonService + /// + /// This class wraps the Text to Speech service. + /// Text to Speech Service + /// + public class TextToSpeech : IWatsonService { #region Public Types diff --git a/Scripts/Services/ToneAnalyzer/DataModels.cs b/Scripts/Services/ToneAnalyzer/DataModels.cs index 75b384306..01c9e7337 100644 --- a/Scripts/Services/ToneAnalyzer/DataModels.cs +++ b/Scripts/Services/ToneAnalyzer/DataModels.cs @@ -182,6 +182,9 @@ public class SentenceTone /// /// The highest score. private double m_HighestScore = -1; + /// + /// Returns the highest score. + /// public double HighestScore { get @@ -210,7 +213,10 @@ public double HighestScore /// /// The name of the highest score tone. private string m_HighestScoreToneName = null; - public string HighestScoreToneName + /// + /// The highest score tone name. + /// + public string HighestScoreToneName { get { @@ -223,7 +229,10 @@ public string HighestScoreToneName /// /// The name of the highest score tone category. private string m_HighestScoreToneCategoryName = null; - public string HighestScoreToneCategoryName + /// + /// The highest score category name. + /// + public string HighestScoreToneCategoryName { get { diff --git a/Scripts/Services/ToneAnalyzer/ToneAnalyzer.cs b/Scripts/Services/ToneAnalyzer/ToneAnalyzer.cs index 2796681f8..2db0ffff2 100644 --- a/Scripts/Services/ToneAnalyzer/ToneAnalyzer.cs +++ b/Scripts/Services/ToneAnalyzer/ToneAnalyzer.cs @@ -27,7 +27,11 @@ namespace IBM.Watson.DeveloperCloud.Services.ToneAnalyzer.v3 { - public class ToneAnalyzer : IWatsonService + /// + /// This class wraps the Tone Analyzer service. + /// Tone Analyzer Service + /// + public class ToneAnalyzer : IWatsonService { #region Private Data private const string SERVICE_ID = "ToneAnalyzerV3"; @@ -36,6 +40,12 @@ public class ToneAnalyzer : IWatsonService #region Get Tone private const string FUNCTION_TONE = "/v3/tone"; + + /// + /// The Get Tone Analyzed callback delegate. + /// + /// + /// public delegate void OnGetToneAnalyzed( ToneAnalyzerResponse resp, string data ); /// diff --git a/Scripts/Services/TradeoffAnalytics/DataModels.cs b/Scripts/Services/TradeoffAnalytics/DataModels.cs index 438bc01e8..6b6ad114e 100644 --- a/Scripts/Services/TradeoffAnalytics/DataModels.cs +++ b/Scripts/Services/TradeoffAnalytics/DataModels.cs @@ -26,7 +26,13 @@ namespace IBM.Watson.DeveloperCloud.Services.TradeoffAnalytics.v1 [fsObject] public class DilemmasResponse { + /// + /// The problem. + /// public Problem problem { get; set; } + /// + /// The resolution. + /// public Resolution resolution { get; set; } } @@ -36,8 +42,17 @@ public class DilemmasResponse [fsObject] public class Problem { + /// + /// The problem columns. + /// public Column[] columns { get; set; } + /// + /// The problem options. + /// public Option[] options { get; set; } + /// + /// The problem subject. + /// public string subject { get; set; } } @@ -47,17 +62,53 @@ public class Problem [fsObject] public class Column { + /// + /// The key. + /// public string key { get; set; } + /// + /// The type. + /// public string type{ get; set; } + /// + /// The description. + /// public string description { get; set; } + /// + /// The format. + /// public string format { get; set; } + /// + /// The full name. + /// public string full_name { get; set; } + /// + /// The goal. + /// public string goal { get; set; } + /// + /// The insignificant loss. + /// public int insignificant_loss { get; set; } + /// + /// Weather or not the column is the objective. + /// public bool is_objective { get; set; } + /// + /// The column preferences. + /// public string[] preference { get; set; } + /// + /// The range. + /// public Range range { get; set; } + /// + /// The signficant gain. + /// public long significant_gain{ get; set; } + /// + /// The significant loss. + /// public long significant_loss{ get; set; } } @@ -73,6 +124,9 @@ public class Range {}; [fsObject] public class CategoricalRange : Range { + /// + /// The categorical range keys. + /// public string[] keys { get; set; } } @@ -82,7 +136,13 @@ public class CategoricalRange : Range [fsObject] public class DateRange : Range { + /// + /// The date range low value. + /// public string low { get; set; } + /// + /// The date range high value. + /// public string high { get; set; } } @@ -92,7 +152,13 @@ public class DateRange : Range [fsObject] public class ValueRange : Range { + /// + /// The value range low value. + /// public double low { get; set; } + /// + /// The value range high value. + /// public double high { get; set; } } @@ -102,10 +168,25 @@ public class ValueRange : Range [fsObject] public class Option { + /// + /// The application data. + /// public ApplicationData app_data { get; set; } + /// + /// The description. + /// public string description_html { get; set; } + /// + /// The key. + /// public string key { get; set; } + /// + /// THe name. + /// public string name { get; set; } + /// + /// The application data values. + /// public ApplicationDataValue values { get; set; } } @@ -128,7 +209,13 @@ public class ApplicationDataValue {} [fsObject] public class Resolution { + /// + /// The resolution map. + /// public Map map { get; set; } + /// + /// The resolution solutions. + /// public Solution[] solutions { get; set; } } @@ -138,9 +225,21 @@ public class Resolution [fsObject] public class Map { + /// + /// The map anchors. + /// public Anchor[] anchors { get; set; } + /// + /// The map comments. + /// public string comments{ get; set; } + /// + /// The map config. + /// public Config config{ get; set; } + /// + /// The map nodes. + /// public Node[] nodes{ get; set; } } @@ -150,7 +249,13 @@ public class Map [fsObject] public class Anchor { + /// + /// The anchor name. + /// public string name { get; set; } + /// + /// The anchor position. + /// public Position position { get; set; } } @@ -160,7 +265,13 @@ public class Anchor [fsObject] public class Position { + /// + /// The X position. + /// public double x { get; set; } + /// + /// The Y position. + /// public double y { get; set; } } @@ -170,7 +281,13 @@ public class Position [fsObject] public class Config { + /// + /// The config drivers. + /// public Drivers drivers { get; set; } + /// + /// The config parameters. + /// public Params @params { get; set; } } @@ -180,13 +297,37 @@ public class Config [fsObject] public class Drivers { + /// + /// The drivers alpha init. + /// public double alpha_init { get; set; } + /// + /// THe drivers data multiplier. + /// public double data_multiplier { get; set; } + /// + /// The drivers maximum map size. + /// public double max_map_size { get; set; } + /// + /// The drivers anchor init. + /// public double r_anchor_init { get; set; } + /// + /// The drivers fin. + /// public double r_fin { get; set; } + /// + /// The drivers init. + /// public double r_init { get; set; } + /// + /// The drivers training anchors. + /// public double training_anchors { get; set; } + /// + /// The drivers training length. + /// public double training_length { get; set; } } @@ -196,13 +337,37 @@ public class Drivers [fsObject] public class Params { + /// + /// The parameters alpha init. + /// public double alpha_init { get; set; } + /// + /// The drivers anchor epoch. + /// public double anchor_epoch { get; set; } + /// + /// The drivers map size. + /// public double map_size { get; set; } + /// + /// The drivers anchor. + /// public double rAnchor { get; set; } + /// + /// The drivers finish. + /// public double rFinish { get; set; } + /// + /// The drivers init. + /// public double rInit { get; set; } + /// + /// The drivers seed. + /// public double seed { get; set; } + /// + /// The drivers training period. + /// public double training_period { get; set; } } @@ -212,7 +377,13 @@ public class Params [fsObject] public class Metrics { + /// + /// The metrtics final kappa. + /// public double final_kappa { get; set; } + /// + /// The metrics kappa. + /// public double kappa { get; set; } } @@ -222,7 +393,13 @@ public class Metrics [fsObject] public class Node { + /// + /// The node coordinates. + /// public Position coordinates { get; set; } + /// + /// The nodes solution references. + /// public string[] solution_refs { get; set; } } @@ -232,10 +409,25 @@ public class Node [fsObject] public class Solution { + /// + /// The solution' shadow mes + /// public string[] shadow_me { get; set; } + /// + /// The solution' shadows. + /// public string[] shadows { get; set; } + /// + /// The solution' reference. + /// public string solution_ref { get; set; } + /// + /// The solution's status. + /// public string status { get; set; } + /// + /// The solution's status cause. + /// public StatusCause status_cause { get; set; } } @@ -245,8 +437,17 @@ public class Solution [fsObject] public class StatusCause { + /// + /// The status cause's error code. + /// public string error_code { get; set; } + /// + /// The status cause's message. + /// public string message { get; set; } + /// + /// The status cause's tokens. + /// public string[] tokens { get; set; } } } diff --git a/Scripts/Services/TradeoffAnalytics/TradeoffAnalytics.cs b/Scripts/Services/TradeoffAnalytics/TradeoffAnalytics.cs index 6cf4ce792..c0851557a 100644 --- a/Scripts/Services/TradeoffAnalytics/TradeoffAnalytics.cs +++ b/Scripts/Services/TradeoffAnalytics/TradeoffAnalytics.cs @@ -27,11 +27,11 @@ namespace IBM.Watson.DeveloperCloud.Services.TradeoffAnalytics.v1 { - /// - /// This class wraps the TradeOff Analytics service. - /// TradeOff Analytics Service - /// - public class TradeoffAnalytics : IWatsonService + /// + /// This class wraps the TradeOff Analytics service. + /// TradeOff Analytics Service + /// + public class TradeoffAnalytics : IWatsonService { #region Private Data @@ -41,6 +41,10 @@ public class TradeoffAnalytics : IWatsonService #region Dilemmas private const string FUNCTION_DILEMMA = "/v1/dilemmas"; + /// + /// The On Dilemma callback delegate. + /// + /// public delegate void OnDilemma( DilemmasResponse resp ); public bool GetDilemma(OnDilemma callback, Problem problem, Boolean generateVisualization) diff --git a/Scripts/Services/VisualRecognition/DataModels.cs b/Scripts/Services/VisualRecognition/DataModels.cs index b2c964943..131b7c1f8 100644 --- a/Scripts/Services/VisualRecognition/DataModels.cs +++ b/Scripts/Services/VisualRecognition/DataModels.cs @@ -19,214 +19,520 @@ namespace IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3 { #region Classify + /// + /// Holds multiple classifications. + /// [fsObject] public class ClassifyTopLevelMultiple { + /// + /// The number of images processed. + /// public int images_processed { get; set; } + /// + /// Array of classified images. + /// public ClassifyTopLevelSingle[] images { get; set; } + /// + /// Array of warnings. + /// public WarningInfo[] warnings { get; set; } } + /// + /// One classification. + /// [fsObject] public class ClassifyTopLevelSingle { + /// + /// The source URL. + /// public string source_url { get; set; } + /// + /// The resolved URL. + /// public string resolved_url { get; set; } + /// + /// The Image. + /// public string image { get; set; } + /// + /// The error. + /// public ErrorInfoNoCode error { get; set; } + /// + /// The classification results. + /// public ClassifyPerClassifier[] classifiers { get; set; } } + /// + /// One classifier. + /// [fsObject] public class ClassifyPerClassifier { + /// + /// The name. + /// public string name { get; set; } + /// + /// The classifier identifier. + /// public string classifier_id { get; set; } + /// + /// Array of classification results. + /// public ClassResult[] classes { get; set; } } + /// + /// One class result. + /// [fsObject] public class ClassResult { + /// + /// The class result. + /// [fsProperty("class")] public string m_class { get; set; } + /// + /// The score. + /// public string score { get; set; } + /// + /// The type hierarchy. + /// public string type_hierarchy { get; set; } } + /// + /// The classify parameters. + /// [fsObject] public class ClassifyParameters { + /// + /// The URL. + /// public string url { get; set; } + /// + /// The clasifier identifiers. + /// public string[] classifier_ids { get; set; } + /// + /// The owners. + /// public string[] owners { get; set; } + /// + /// The classification threshold. + /// public float threshold { get; set; } } #endregion #region Detect Faces + /// + /// Multiple faces. + /// [fsObject] public class FacesTopLevelMultiple { + /// + /// Number of images processed. + /// public int images_processed { get; set; } + /// + /// Array of face classifications. + /// public FacesTopLevelSingle[] images { get; set; } + /// + /// Warning info. + /// public WarningInfo[] warnings { get; set; } } + /// + /// One face classification. + /// [fsObject] public class FacesTopLevelSingle { + /// + /// The source URL. + /// public string source_url { get; set; } + /// + /// The resolved URL. + /// public string resolved_url { get; set; } + /// + /// The image. + /// public string image { get; set; } + /// + /// The error. + /// public ErrorInfoNoCode error { get; set; } + /// + /// The face results. + /// public OneFaceResult[] faces { get; set; } } + /// + /// One face result. + /// [fsObject] public class OneFaceResult { + /// + /// The face age. + /// public Age age { get; set; } + /// + /// The face gender. + /// public Gender gender { get; set; } + /// + /// The face location in pixels. + /// public FaceLocation face_location { get; set; } + /// + /// The face identity. + /// public Identity identity { get; set; } } + /// + /// Detect faces parameters. + /// [fsObject] public class DetectFacesParameters { + /// + /// The face URL. + /// public string url { get; set; } } #endregion #region Recognize Text + /// + /// Mulitple text pages. + /// [fsObject] public class TextRecogTopLevelMultiple { + /// + /// Number of images processed. + /// public int images_processed { get; set; } + /// + /// Array of text image classifications. + /// public TextRecogTopLevelSingle[] images { get; set; } + /// + /// The warnings. + /// public WarningInfo[] warnings { get; set; } } + /// + /// One text page. + /// [fsObject] public class TextRecogTopLevelSingle { + /// + /// The source URL. + /// public string source_url { get; set; } + /// + /// The resolved URL. + /// public string resolved_url { get; set; } + /// + /// The image. + /// public string image { get; set; } + /// + /// The error. + /// public ErrorInfoNoCode error { get; set; } + /// + /// The text. + /// public string text { get; set; } + /// + /// The words. + /// public TextRecogOneWord[] words { get; set; } } + /// + /// One word. + /// [fsObject] public class TextRecogOneWord { + /// + /// The word. + /// public string word { get; set; } + /// + /// The word location in pixels. + /// public Location location { get; set; } + /// + /// The classification score. + /// public double score { get; set; } + /// + /// The line number. + /// public double line_number { get; set; } } + /// + /// Word location. + /// [fsObject] public class Location { + /// + /// The location width. + /// public double width { get; set; } + /// + /// The location height. + /// public double height { get; set; } + /// + /// The location left. + /// public double left { get; set; } + /// + /// The loction top. + /// public double top { get; set; } } + /// + /// Recognize text parameters. + /// [fsObject] public class RecognizeTextParameters { + /// + /// The URL. + /// public string url { get; set; } } #endregion #region Classifiers + /// + /// Classifiers breif. + /// [fsObject] public class GetClassifiersTopLevelBrief { + /// + /// Array of classifiers. + /// public GetClassifiersPerClassifierBrief[] classifiers { get; set; } } + /// + /// Classifier breif. + /// [fsObject] public class GetClassifiersPerClassifierBrief { + /// + /// The classifier identifier. + /// public string classifier_id { get; set; } + /// + /// The classifier name. + /// public string name { get; set; } } + /// + /// Classifier verbose. + /// [fsObject] public class GetClassifiersPerClassifierVerbose { + /// + /// The classifier identifier. + /// public string classifier_id { get; set; } + /// + /// The classifier name. + /// public string name { get; set; } + /// + /// The classifier owner. + /// public string owner { get; set; } + /// + /// The classifier status. + /// public string status { get; set; } + /// + /// The classifier explanation. + /// public string explanation { get; set; } + /// + /// The classifier created. + /// public string created { get; set; } + /// + /// Array of classes. + /// public Class[] classes { get; set; } } + /// + /// The class. + /// [fsObject] public class Class { + /// + /// The class. + /// [fsProperty("class")] public string m_Class { get; set; } } #endregion #region Common + /// + /// Warning info. + /// [fsObject] public class WarningInfo { + /// + /// The warning identifier. + /// public string warning_id { get; set; } + /// + /// The warning description. + /// public string description { get; set; } } + /// + /// Error info. + /// [fsObject] public class ErrorInfoNoCode { + /// + /// The error identifier. + /// public string error_id { get; set; } + /// + /// The error description. + /// public string description { get; set; } } + /// + /// Age of the face. + /// [fsObject] public class Age { + /// + /// The minimum age. + /// public int min { get; set; } + /// + /// The maximum age. + /// public int max { get; set; } + /// + /// The age classification score. + /// public double score { get; set; } } + /// + /// Gender of the face. + /// [fsObject] public class Gender { + /// + /// The gener. + /// public string gender { get; set; } + /// + /// The gender classification score. + /// public double score { get; set; } } + /// + /// Location of the face. + /// [fsObject] public class FaceLocation { + /// + /// The face location width. + /// public double width { get; set; } + /// + /// The face location height. + /// public double height { get; set; } + /// + /// The face location left. + /// public double left { get; set; } + /// + /// The face location top. + /// public double top { get; set; } } + /// + /// Identity of the face. + /// [fsObject] public class Identity { + /// + /// The name. + /// public string name { get; set; } + /// + /// The identity classification score. + /// public double score { get; set; } + /// + /// The identity classification type hierarchy. + /// public string type_hierarchy { get; set; } } + /// + /// The Visual Recognition version. + /// public class VisualRecognitionVersion { + /// + /// The version. + /// public const string Version = "2016-05-20"; } #endregion diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index f5ddf9c09..f97b426d5 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -30,7 +30,11 @@ namespace IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3 { - public class VisualRecognition : IWatsonService + /// + /// This class wraps the Visual Recognition service. + /// Visual Recognition Service + /// + public class VisualRecognition : IWatsonService { #region Public Types /// @@ -900,16 +904,16 @@ private string GetMimeType(string imagePath) return mimeType; } - #endregion - - #region IWatsonService implementation + #endregion - public string GetServiceID() + #region IWatsonService implementation + /// + public string GetServiceID() { return SERVICE_ID; } - - public void GetServiceStatus(ServiceStatus callback) + /// + public void GetServiceStatus(ServiceStatus callback) { if (Config.Instance.FindCredentials(SERVICE_ID) != null) new CheckServiceStatus(this, callback); diff --git a/Scripts/UnitTests/TestPersonalityInsights.cs b/Scripts/UnitTests/TestPersonalityInsights.cs index 3f24b722f..c965a805f 100644 --- a/Scripts/UnitTests/TestPersonalityInsights.cs +++ b/Scripts/UnitTests/TestPersonalityInsights.cs @@ -51,7 +51,7 @@ public override IEnumerator RunTest() yield break; } - private void OnGetProfileText(DataModels.Profile profile, string data) + private void OnGetProfileText(Profile profile, string data) { Test(profile != null); @@ -77,7 +77,7 @@ private void OnGetProfileText(DataModels.Profile profile, string data) } } - private void OnGetProfileJson(DataModels.Profile profile, string data) + private void OnGetProfileJson(Profile profile, string data) { Test(profile != null); @@ -103,7 +103,7 @@ private void OnGetProfileJson(DataModels.Profile profile, string data) } } - private void LogTraitTree(DataModels.TraitTreeNode traitTreeNode) + private void LogTraitTree(TraitTreeNode traitTreeNode) { if(!string.IsNullOrEmpty(traitTreeNode.id)) Log.Debug("ExamplePersonalityInsights", "id: {0}", traitTreeNode.id); @@ -120,7 +120,7 @@ private void LogTraitTree(DataModels.TraitTreeNode traitTreeNode) if(!string.IsNullOrEmpty(traitTreeNode.raw_sampling_error)) Log.Debug("ExamplePersonalityInsights", "raw_sampling_error: {0}", traitTreeNode.raw_sampling_error); if(traitTreeNode.children != null && traitTreeNode.children.Length > 0) - foreach(DataModels.TraitTreeNode childNode in traitTreeNode.children) + foreach(TraitTreeNode childNode in traitTreeNode.children) LogTraitTree(childNode); } } diff --git a/Scripts/Utilities/Config.cs b/Scripts/Utilities/Config.cs index 20d166fdc..e6d29390b 100644 --- a/Scripts/Utilities/Config.cs +++ b/Scripts/Utilities/Config.cs @@ -317,6 +317,11 @@ public Variable GetVariable(string key) return null; } + /// + /// Gets an API key by service ID if it exists. + /// + /// + /// public string GetAPIKey(string serviceID) { foreach (var info in m_Credentials) diff --git a/Scripts/Utilities/Constants.cs b/Scripts/Utilities/Constants.cs index 4b0b4f1ea..c1850f9a9 100755 --- a/Scripts/Utilities/Constants.cs +++ b/Scripts/Utilities/Constants.cs @@ -38,11 +38,11 @@ public static class Path /// /// Cache folder to customize a parent folder for cache directory /// - public static string CACHE_FOLDER = ""; //It needs to start with / + public static string CACHE_FOLDER = ""; //It needs to start with / /// /// Log folder to customize a parent folder for logs /// - public static string LOG_FOLDER = ""; //It needs to start with / + public static string LOG_FOLDER = ""; //It needs to start with / } /// @@ -66,7 +66,7 @@ public static class Resources public static class String { /// - public const string VERSION = "watson-developer-cloud-unity-sdk-0.6.0"; + public const string VERSION = "watson-developer-cloud-unity-sdk-0.6.1"; /// public const string DEBUG_DISPLAY_QUALITY = "Quality: {0}"; } diff --git a/Scripts/Utilities/Credentials.cs b/Scripts/Utilities/Credentials.cs index f0e2cb044..a1edc70b8 100644 --- a/Scripts/Utilities/Credentials.cs +++ b/Scripts/Utilities/Credentials.cs @@ -59,6 +59,10 @@ public string CreateAuthorization() return "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(User + ":" + Password)); } + /// + /// Do we have credentials? + /// + /// public bool HasCredentials() { return !string.IsNullOrEmpty(User) && !string.IsNullOrEmpty(Password); diff --git a/Scripts/Utilities/DataCache.cs b/Scripts/Utilities/DataCache.cs index ff08685ca..229028243 100644 --- a/Scripts/Utilities/DataCache.cs +++ b/Scripts/Utilities/DataCache.cs @@ -129,6 +129,11 @@ public byte[] Find(string id) return null; } + /// + /// Is the data cached? + /// + /// + /// public bool IsCached(string id) { bool isCached = false; diff --git a/Scripts/Utilities/FrameRateCounter.cs b/Scripts/Utilities/FrameRateCounter.cs index 577692d91..1d93839da 100644 --- a/Scripts/Utilities/FrameRateCounter.cs +++ b/Scripts/Utilities/FrameRateCounter.cs @@ -20,6 +20,9 @@ namespace IBM.Watson.DeveloperCloud.Utilities { + /// + /// Displays the frame rate of the application. + /// public class FrameRateCounter : MonoBehaviour { const float FPS_INTERVAL = 0.5f; diff --git a/Scripts/Utilities/Runnable.cs b/Scripts/Utilities/Runnable.cs index 475c2816b..c9d544097 100644 --- a/Scripts/Utilities/Runnable.cs +++ b/Scripts/Utilities/Runnable.cs @@ -72,10 +72,10 @@ static public bool IsRunning(int id) #if UNITY_EDITOR private static bool sm_EditorRunnable = false; - /// - /// This function enables the Runnable in edit mode. - /// - public static void EnableRunnableInEditor() + /// + /// This function enables the Runnable in edit mode. + /// + public static void EnableRunnableInEditor() { if (!sm_EditorRunnable) { diff --git a/Scripts/Utilities/TimedDestroy.cs b/Scripts/Utilities/TimedDestroy.cs index 171867ea7..f9cda6136 100644 --- a/Scripts/Utilities/TimedDestroy.cs +++ b/Scripts/Utilities/TimedDestroy.cs @@ -94,6 +94,9 @@ private void Update() } } + /// + /// Resets the timer. + /// public void ResetTimer() { m_ElapsedTime = 0.0f; diff --git a/Scripts/Utilities/Utility.cs b/Scripts/Utilities/Utility.cs index ee09efa87..06bc358d9 100644 --- a/Scripts/Utilities/Utility.cs +++ b/Scripts/Utilities/Utility.cs @@ -313,7 +313,17 @@ public static string MacAddress } #region Cache Generic Deserialization - + /// + /// Save value to data cache. + /// + /// + /// + /// + /// + /// + /// + /// + /// public static void SaveToCache(Dictionary dictionaryCache, string cacheDirectoryId, string cacheId, T objectToCache, string prefix="", long maxCacheSize = 1024 * 1024 * 50, double maxCacheAge = 24 * 7) where T : class, new() { if (objectToCache != null) @@ -335,6 +345,15 @@ public static string MacAddress } } + /// + /// Get value from the data cache. + /// + /// + /// + /// + /// + /// + /// public static T GetFromCache(Dictionary dictionaryCache, string cacheDirectoryId, string cacheId, string prefix="") where T : class, new() { T cachedObject = null; diff --git a/Scripts/Widgets/NaturalLanguageClassifierWidget.cs b/Scripts/Widgets/NaturalLanguageClassifierWidget.cs index bdf5d1a72..cf894e11f 100644 --- a/Scripts/Widgets/NaturalLanguageClassifierWidget.cs +++ b/Scripts/Widgets/NaturalLanguageClassifierWidget.cs @@ -104,7 +104,11 @@ public float IgnoreWordConfidence PlayerPrefs.Save(); } } - public float IgnoreWordConfidenceDelta + /// + /// Gets or sets the value of ignore word confidence delta. + /// + /// The ignore word confidence delta. + public float IgnoreWordConfidenceDelta { get { return m_IgnoreWordConfidenceDelta; } set @@ -135,7 +139,12 @@ public float MinWordConfidence PlayerPrefs.Save(); } } - public float MinWordConfidenceDelta + + /// + /// Gets or sets the minimum value of word confidence delta. + /// + /// The minimum word confidence delta. + public float MinWordConfidenceDelta { get { return m_MinWordConfidenceDelta; } set @@ -163,7 +172,12 @@ public float MinClassEventConfidence PlayerPrefs.Save(); } } - public float MinClassEventConfidenceDelta + + /// + /// Gets or sets the minimum value of class event confidence delta. + /// + /// The minimum class event confidence delta. + public float MinClassEventConfidenceDelta { get { return m_MinClassEventConfidenceDelta; } set diff --git a/Scripts/Widgets/Widget.cs b/Scripts/Widgets/Widget.cs index 72b41b211..b399228cb 100644 --- a/Scripts/Widgets/Widget.cs +++ b/Scripts/Widgets/Widget.cs @@ -131,10 +131,15 @@ public override string ToString() /// The delegate to the receiver function, this is set when Start() is called on this input. /// public OnReceiveData DataReceiver { get; private set; } - #endregion - - #region Public Functions - public bool AddOutput(Output output) + #endregion + + #region Public Functions + /// + /// Add output to input. + /// + /// + /// + public bool AddOutput(Output output) { if (!AllowMany && m_Connections.Count > 0) return false; @@ -143,7 +148,12 @@ public bool AddOutput(Output output) m_Connections.Add(output); return true; } - public bool RemoveOutput(Output output) + /// + /// Remove the output. + /// + /// + /// + public bool RemoveOutput(Output output) { return m_Connections.Remove(output); } @@ -190,6 +200,9 @@ public virtual void ReceiveData(Data data) [Serializable] public class Output { + /// + /// The connection between widgets. + /// #region Public Types [Serializable] public class Connection @@ -244,6 +257,10 @@ public Input TargetInput #endregion #region Public Functions + /// + /// Resolve the target input. + /// + /// public bool ResolveTargetInput() { if (!m_TargetInputResolved) @@ -293,6 +310,10 @@ public bool ResolveTargetInput() return m_TargetInput != null; } + /// + /// Start ouput. + /// + /// public void Start(Output owner) { m_Owner = owner; @@ -336,6 +357,10 @@ public bool IsConnected return false; } } + + /// + /// Connections between widgets. + /// public Connection[] Connections { get { return m_Connections.ToArray(); } } /// /// Returns a reference to the Widget owner, this is set when the Widget initializes. @@ -432,6 +457,11 @@ public bool AddConnection(GameObject targetObject, string targetConnection = nul return true; } + /// + /// Remove the connection between widgets. + /// + /// + /// public bool RemoveConnection(Connection c) { return m_Connections.Remove(c); diff --git a/exclude-filter.txt.meta b/exclude-filter.txt.meta deleted file mode 100755 index 3ef8cc146..000000000 --- a/exclude-filter.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 381c436446f698440995e8ef40c04a56 -timeCreated: 1468522240 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: