diff --git a/Source/AlchemyDataNewsV1/Models/DocumentSource.swift b/Source/AlchemyDataNewsV1/Models/DocumentSource.swift index 912bdabb7..ada0f2a20 100644 --- a/Source/AlchemyDataNewsV1/Models/DocumentSource.swift +++ b/Source/AlchemyDataNewsV1/Models/DocumentSource.swift @@ -29,7 +29,7 @@ public struct DocumentSource: JSONDecodable { /** see **DocumentEnriched** */ public let enriched: DocumentEnriched? - // used internally to initialize a DocumentSource object + /// used internally to initialize a DocumentSource object public init(json: JSON) throws { enriched = try? json.decode("enriched", type: DocumentEnriched.self) } diff --git a/Source/AlchemyDataNewsV1/Models/Entity.swift b/Source/AlchemyDataNewsV1/Models/Entity.swift index 1e9bcc3c7..745e84801 100644 --- a/Source/AlchemyDataNewsV1/Models/Entity.swift +++ b/Source/AlchemyDataNewsV1/Models/Entity.swift @@ -43,7 +43,7 @@ public struct Entity: JSONDecodable { /** Classification */ public let type: String? - // Used internally to initialize an Entity object + /// Used internally to initialize an Entity object public init(json: JSON) throws { if let countString = try? json.string("count") { count = Int(countString) diff --git a/Source/AlchemyDataNewsV1/Models/NewsResponse.swift b/Source/AlchemyDataNewsV1/Models/NewsResponse.swift index fc039dcff..b6f0ed5f2 100644 --- a/Source/AlchemyDataNewsV1/Models/NewsResponse.swift +++ b/Source/AlchemyDataNewsV1/Models/NewsResponse.swift @@ -32,6 +32,7 @@ public struct NewsResponse: JSONDecodable { /** see **NewsResult** */ public let result: NewsResult? + /// Used internally to initialize a NewsResponse object public init(json: JSON) throws { totalTransactions = try Int(json.string("totalTransactions"))! result = try? json.decode("result", type: NewsResult.self) diff --git a/Source/AlchemyLanguageV1/AlchemyLanguage.swift b/Source/AlchemyLanguageV1/AlchemyLanguage.swift index 2b8e87723..a8a9f6cfb 100644 --- a/Source/AlchemyLanguageV1/AlchemyLanguage.swift +++ b/Source/AlchemyLanguageV1/AlchemyLanguage.swift @@ -32,7 +32,7 @@ public class AlchemyLanguage { private let errorDomain = "com.watsonplatform.alchemyLanguage" private let userAgent = buildUserAgent("watson-apis-ios-sdk/0.4.0 AlchemyLanguageV1") - let unreservedCharacters = NSCharacterSet(charactersInString: "abcdefghijklmnopqrstuvwxyz" + + private let unreservedCharacters = NSCharacterSet(charactersInString: "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "1234567890-._~") diff --git a/Source/AlchemyLanguageV1/Models/DocumentEmotion.swift b/Source/AlchemyLanguageV1/Models/DocumentEmotion.swift index 1c1672df4..d0e9332ee 100644 --- a/Source/AlchemyLanguageV1/Models/DocumentEmotion.swift +++ b/Source/AlchemyLanguageV1/Models/DocumentEmotion.swift @@ -17,13 +17,22 @@ import Foundation import Freddy +/** Response object for **Emotions** related requests */ public struct DocumentEmotion: JSONDecodable { + /// content URL public let url: String? + + /// total number of transactions made by the request public let totalTransactions: Int? + + /// language of the analyzed document public let language: String? + + /// see **Emotions** public let docEmotions: Emotions? + /// used internally to initialize a DocumentEmotion object public init(json: JSON) throws { url = try? json.string("url") if let totalTransactionsString = try? json.string("totalTransactions") { diff --git a/Source/AlchemyLanguageV1/Models/Entity.swift b/Source/AlchemyLanguageV1/Models/Entity.swift index 1e9bcc3c7..745e84801 100644 --- a/Source/AlchemyLanguageV1/Models/Entity.swift +++ b/Source/AlchemyLanguageV1/Models/Entity.swift @@ -43,7 +43,7 @@ public struct Entity: JSONDecodable { /** Classification */ public let type: String? - // Used internally to initialize an Entity object + /// Used internally to initialize an Entity object public init(json: JSON) throws { if let countString = try? json.string("count") { count = Int(countString) diff --git a/Source/AlchemyLanguageV1/Models/Language.swift b/Source/AlchemyLanguageV1/Models/Language.swift index 3ae0c569f..bac574cde 100644 --- a/Source/AlchemyLanguageV1/Models/Language.swift +++ b/Source/AlchemyLanguageV1/Models/Language.swift @@ -33,10 +33,10 @@ public struct Language: JSONDecodable { /** the URL information was requestd for */ public let url: String? - //** link to Ethnologue containing information on detected language */ + /** link to Ethnologue containing information on detected language */ public let ethnologue: String? - //** ISO-639-1 code for the detected language */ + /** ISO-639-1 code for the detected language */ public let iso6391: String? /** ISO-639-2 code for the detected language */ diff --git a/Source/AlchemyLanguageV1/Models/QueryParam.swift b/Source/AlchemyLanguageV1/Models/QueryParam.swift index 2add4a7e3..0c32a18f8 100644 --- a/Source/AlchemyLanguageV1/Models/QueryParam.swift +++ b/Source/AlchemyLanguageV1/Models/QueryParam.swift @@ -20,5 +20,7 @@ import Foundation Enum for determining if a query parameter should be included in the request */ public enum QueryParam: Int { + + /// Constants for if a query parameter should be included in the request case Excluded = 0, Included } \ No newline at end of file diff --git a/Source/AlchemyLanguageV1/Models/SAORelation.swift b/Source/AlchemyLanguageV1/Models/SAORelation.swift index 6eeda1f4c..3908960ca 100644 --- a/Source/AlchemyLanguageV1/Models/SAORelation.swift +++ b/Source/AlchemyLanguageV1/Models/SAORelation.swift @@ -26,9 +26,17 @@ import Freddy */ public struct SAORelation: JSONDecodable { + + /// see Action public let action: Action? + + /// an extracted Sentence public let sentence: String? + + /// see Subject public let subject: Subject? + + /// see RelationObject public let object: RelationObject? /// Used internally to initialize a SAORelation object @@ -45,8 +53,14 @@ public struct SAORelation: JSONDecodable { An action as defined by the AlchemyLanguage service */ public struct Action: JSONDecodable { + + /// text the action was extracted from public let text: String? + + /// the base or dictionary form of the word public let lemmatized: String? + + /// see Verb public let verb: Verb? /// Used internally to initialize an Action object @@ -60,8 +74,14 @@ public struct Action: JSONDecodable { A verb as defined by the AlchemyLanguage service */ public struct Verb: JSONDecodable { + + /// text the verb was extracted from public let text: String? + + /// the tense of the verb public let tense: String? + + /// was the verb negated public let negated: Int? /// Used internally to initalize a Verb object @@ -81,8 +101,14 @@ public struct Action: JSONDecodable { A subjet extracted by the AlchemyLanguage service */ public struct Subject: JSONDecodable { + + /// text the subject was extracted from public let text: String? + + /// see **Sentiment** public let sentiment: Sentiment? + + /// see **Entity** public let entity: Entity? /// Used internally to initialize a Subject object @@ -97,9 +123,17 @@ public struct Subject: JSONDecodable { **Sentiment** related to the Subject-Action-Object extraction */ public struct RelationObject: JSONDecodable { + + /// text the relation object was extracted from public let text: String? + + /// see **Sentiment** public let sentiment: Sentiment? + + /// see **Sentiment** public let sentimentFromSubject: Sentiment? + + /// see **Entity** public let entity: Entity? /// Used internally to initialize a RelationObject object diff --git a/Source/DocumentConversionV1/DocumentConversion.swift b/Source/DocumentConversionV1/DocumentConversion.swift index de36868c2..3d58121e7 100644 --- a/Source/DocumentConversionV1/DocumentConversion.swift +++ b/Source/DocumentConversionV1/DocumentConversion.swift @@ -216,7 +216,13 @@ public class DocumentConversion { Enum for supported return types from the DocumentConversion service */ public enum ReturnType: String { + + /// Constant for AnswerUnits case AnswerUnits = "ANSWER_UNITS" + + /// Constant for HTML case HTML = "NORMALIZED_HTML" + + /// Constant for Text case Text = "NORMALIZED_TEXT" } \ No newline at end of file diff --git a/Source/DocumentConversionV1/Models/FileType.swift b/Source/DocumentConversionV1/Models/FileType.swift index aa50e3b6e..ea70f4fbf 100644 --- a/Source/DocumentConversionV1/Models/FileType.swift +++ b/Source/DocumentConversionV1/Models/FileType.swift @@ -20,8 +20,16 @@ import Foundation Enum for supported file types */ public enum FileType: String { + + /// Constant for HTML file types case HTML = "text/html" + + /// Constant for XML file types case XML = "text/xhtml+xml" + + /// Constant for PDF file types case PDF = "application/pdf" + + /// Constant for MicrosoftWord documents case MSWord = "application/msword" } diff --git a/Source/RelationshipExtractionV1Beta/Models/Relations.swift b/Source/RelationshipExtractionV1Beta/Models/Relations.swift index 1eb580027..9d0e5562e 100644 --- a/Source/RelationshipExtractionV1Beta/Models/Relations.swift +++ b/Source/RelationshipExtractionV1Beta/Models/Relations.swift @@ -77,7 +77,7 @@ public struct RelationEntityArgument: JSONDecodable { } } -/* The mentions that refer to this specific relation. */ +/** The mentions that refer to this specific relation. */ public struct RelatedMentions: JSONDecodable { /// The alphanumeric identifier of the relation mention. diff --git a/Source/TextToSpeechV1/Models/SynthesisVoice.swift b/Source/TextToSpeechV1/Models/SynthesisVoice.swift index 1e9c3f1ff..66f6df56d 100644 --- a/Source/TextToSpeechV1/Models/SynthesisVoice.swift +++ b/Source/TextToSpeechV1/Models/SynthesisVoice.swift @@ -34,7 +34,7 @@ public enum SynthesisVoice { /// English (US dialect) with a female voice (`en-US_LisaVoice`). case US_Lisa - // English (US dialect) with a male voice (`en-US_MichaelVoice`). + /// English (US dialect) with a male voice (`en-US_MichaelVoice`). case US_Michael /// Spanish (Castillian dialect) with a male voice (`es-ES_EnriqueVoice`).