Skip to content

Commit 8303306

Browse files
committed
docs(personality-insights): Add newest generated code docs
1 parent 64d27a0 commit 8303306

File tree

8 files changed

+107
-101
lines changed

8 files changed

+107
-101
lines changed

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/PersonalityInsights.java

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,19 @@
2424
import com.ibm.watson.developer_cloud.util.Validator;
2525

2626
/**
27-
* ### Service Overview
28-
* The IBM Watson Personality Insights service provides a Representational State Transfer (REST) Application Programming
29-
* Interface (API) that enables applications to derive insights from social media, enterprise data, or other digital
30-
* communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics,
31-
* including Big Five, Needs, and Values, from digital communications such as email, text messages, tweets, and forum
32-
* posts. The service can automatically infer, from potentially noisy social media, portraits of individuals that
33-
* reflect their personality characteristics. The service can report consumption preferences based on the results of its
34-
* analysis, and for JSON content that is timestamped, it can report temporal behavior.
35-
* ### API Usage
36-
* The following information provides details about using the service to obtain a personality profile:
37-
* * **The profile method:** The service offers a single `/v3/profile` method that accepts up to 20 MB of input data and
38-
* produces results in JSON or CSV format. The service accepts input in Arabic, English, Japanese, Korean, or Spanish
39-
* and can produce output in a variety of languages.
40-
* * **Authentication:** You authenticate to the service by using your service credentials. You can use your credentials
41-
* to authenticate via a proxy server that resides in IBM Cloud, or you can use your credentials to obtain a token and
42-
* contact the service directly. See [Service credentials for Watson
43-
* services](https://console.bluemix.net/docs/services/watson/getting-started-credentials.html) and [Tokens for
44-
* authentication](https://console.bluemix.net/docs/services/watson/getting-started-tokens.html).
45-
* * **Request Logging:** By default, all Watson services log requests and their results. Data is collected only to
46-
* improve the Watson services. If you do not want to share your data, set the header parameter
47-
* `X-Watson-Learning-Opt-Out` to `true` for each request. Data is collected for any request that omits this header. See
48-
* [Controlling request logging for Watson
49-
* services](https://console.bluemix.net/docs/services/watson/getting-started-logging.html).
27+
* The IBM Watson Personality Insights service enables applications to derive insights from social media, enterprise
28+
* data, or other digital communications. The service uses linguistic analytics to infer individuals' intrinsic
29+
* personality characteristics, including Big Five, Needs, and Values, from digital communications such as email, text
30+
* messages, tweets, and forum posts.
5031
*
51-
* For more information about the service, see [About Personality
52-
* Insights](https://console.bluemix.net/docs/services/personality-insights/index.html). For information about calling
53-
* the service and the responses it can generate, see [Requesting a
54-
* profile](https://console.bluemix.net/docs/services/personality-insights/input.html), [Understanding a JSON
55-
* profile](https://console.bluemix.net/docs/services/personality-insights/output.html), and [Understanding a CSV
56-
* profile](https://console.bluemix.net/docs/services/personality-insights/output-csv.html).
32+
* The service can automatically infer, from potentially noisy social media, portraits of individuals that reflect their
33+
* personality characteristics. The service can infer consumption preferences based on the results of its analysis and,
34+
* for JSON content that is timestamped, can report temporal behavior.
35+
*
36+
* For information about the meaning of the models that the service uses to describe personality characteristics, see
37+
* [Personality models](https://console.bluemix.net/docs/services/personality-insights/models.html). For information
38+
* about the meaning of the consumption preferences, see [Consumption
39+
* preferences](https://console.bluemix.net/docs/services/personality-insights/preferences.html).
5740
*
5841
* @version v3
5942
* @see <a href="http://www.ibm.com/watson/developercloud/personality-insights.html">Personality Insights</a>
@@ -96,13 +79,23 @@ public PersonalityInsights(String versionDate, String username, String password)
9679
}
9780

9881
/**
99-
* Generates a personality profile based on input text.
82+
* Get profile.
10083
*
101-
* Derives personality insights for up to 20 MB of input content written by an author, though the service requires
102-
* much less text to produce an accurate profile; for more information, see [Providing sufficient
103-
* input](https://console.bluemix.net/docs/services/personality-insights/input.html#sufficient). Accepts input in
104-
* Arabic, English, Japanese, Korean, or Spanish and produces output in one of eleven languages. Provide plain text,
105-
* HTML, or JSON content, and receive results in JSON or CSV format.
84+
* Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of input
85+
* content, but it requires much less text to produce an accurate profile; for more information, see [Providing
86+
* sufficient input](https://console.bluemix.net/docs/services/personality-insights/input.html#sufficient). The
87+
* service analyzes text in Arabic, English, Japanese, Korean, or Spanish and returns its results in a variety of
88+
* languages. You can provide plain text, HTML, or JSON input by specifying the **Content-Type** parameter; the
89+
* default is `text/plain`. Request a JSON or comma-separated values (CSV) response by specifying the **Accept**
90+
* parameter; CSV output includes a fixed number of columns and optional headers. Per the JSON specification, the
91+
* default character encoding for JSON content is effectively always UTF-8; per the HTTP specification, the default
92+
* encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII character set). When specifying a content
93+
* type of plain text or HTML, include the `charset` parameter to indicate the character encoding of the input text;
94+
* for example: `Content-Type: text/plain;charset=utf-8`. For detailed information about calling the service and the
95+
* responses it can generate, see (Requesting a
96+
* profile)[https://console.bluemix.net/docs/services/personality-insights/input.html], (Understanding a JSON
97+
* profile)[https://console.bluemix.net/docs/services/personality-insights/output.html], and (Understanding a CSV
98+
* profile)[https://console.bluemix.net/docs/services/personality-insights/output-csv.html].
10699
*
107100
* @param profileOptions the {@link ProfileOptions} containing the options for the call
108101
* @return a {@link ServiceCall} with a response type of {@link Profile}
@@ -134,13 +127,23 @@ public ServiceCall<Profile> profile(ProfileOptions profileOptions) {
134127
}
135128

136129
/**
137-
* Generates a personality profile based on input text.
130+
* Get profile. as csv
138131
*
139-
* Derives personality insights for up to 20 MB of input content written by an author, though the service requires
140-
* much less text to produce an accurate profile; for more information, see [Providing sufficient
141-
* input](https://console.bluemix.net/docs/services/personality-insights/input.html#sufficient). Accepts input in
142-
* Arabic, English, Japanese, Korean, or Spanish and produces output in one of eleven languages. Provide plain text,
143-
* HTML, or JSON content, and receive results in JSON or CSV format.
132+
* Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of input
133+
* content, but it requires much less text to produce an accurate profile; for more information, see [Providing
134+
* sufficient input](https://console.bluemix.net/docs/services/personality-insights/input.html#sufficient). The
135+
* service analyzes text in Arabic, English, Japanese, Korean, or Spanish and returns its results in a variety of
136+
* languages. You can provide plain text, HTML, or JSON input by specifying the **Content-Type** parameter; the
137+
* default is `text/plain`. Request a JSON or comma-separated values (CSV) response by specifying the **Accept**
138+
* parameter; CSV output includes a fixed number of columns and optional headers. Per the JSON specification, the
139+
* default character encoding for JSON content is effectively always UTF-8; per the HTTP specification, the default
140+
* encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII character set). When specifying a content
141+
* type of plain text or HTML, include the `charset` parameter to indicate the character encoding of the input text;
142+
* for example: `Content-Type: text/plain;charset=utf-8`. For detailed information about calling the service and the
143+
* responses it can generate, see (Requesting a
144+
* profile)[https://console.bluemix.net/docs/services/personality-insights/input.html], (Understanding a JSON
145+
* profile)[https://console.bluemix.net/docs/services/personality-insights/output.html], and (Understanding a CSV
146+
* profile)[https://console.bluemix.net/docs/services/personality-insights/output-csv.html].
144147
*
145148
* @param profileOptions the {@link ProfileOptions} containing the options for the call
146149
* @param includeHeaders option to have the CSV headers returned with the response

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/Behavior.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public class Behavior extends GenericModel {
2929
/**
3030
* Gets the traitId.
3131
*
32-
* The unique identifier of the characteristic to which the results pertain. IDs have the form `behavior_{value}`.
32+
* The unique, non-localized identifier of the characteristic to which the results pertain. IDs have the form
33+
* `behavior_{value}`.
3334
*
3435
* @return the traitId
3536
*/
@@ -40,7 +41,7 @@ public String getTraitId() {
4041
/**
4142
* Gets the name.
4243
*
43-
* The user-visible name of the characteristic.
44+
* The user-visible, localized name of the characteristic.
4445
*
4546
* @return the name
4647
*/

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ConsumptionPreferences.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class ConsumptionPreferences extends GenericModel {
2828
/**
2929
* Gets the consumptionPreferenceId.
3030
*
31-
* The unique identifier of the consumption preference to which the results pertain. IDs have the form
31+
* The unique, non-localized identifier of the consumption preference to which the results pertain. IDs have the form
3232
* `consumption_preferences_{preference}`.
3333
*
3434
* @return the consumptionPreferenceId
@@ -40,7 +40,7 @@ public String getConsumptionPreferenceId() {
4040
/**
4141
* Gets the name.
4242
*
43-
* The user-visible name of the consumption preference.
43+
* The user-visible, localized name of the consumption preference.
4444
*
4545
* @return the name
4646
*/

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ConsumptionPreferencesCategory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public class ConsumptionPreferencesCategory extends GenericModel {
3131
/**
3232
* Gets the consumptionPreferenceCategoryId.
3333
*
34-
* The unique identifier of the consumption preferences category to which the results pertain. IDs have the form
35-
* `consumption_preferences_{category}`.
34+
* The unique, non-localized identifier of the consumption preferences category to which the results pertain. IDs have
35+
* the form `consumption_preferences_{category}`.
3636
*
3737
* @return the consumptionPreferenceCategoryId
3838
*/

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ContentItem.java

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
public class ContentItem extends GenericModel {
2222

2323
/**
24-
* MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is analyzed;
25-
* plain text is processed as submitted.
24+
* The MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is
25+
* analyzed; plain text is processed as submitted.
2626
*/
2727
public interface Contenttype {
2828
/** text/plain. */
@@ -32,12 +32,12 @@ public interface Contenttype {
3232
}
3333

3434
/**
35-
* Language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is `en`
35+
* The language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is `en`
3636
* (English). Regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. A
37-
* language specified with the `Content-Type` header overrides the value of this parameter; any content items that
38-
* specify a different language are ignored. Omit the `Content-Type` header to base the language on the most prevalent
39-
* specification among the content items; again, content items that specify a different language are ignored. You can
40-
* specify any combination of languages for the input and response content.
37+
* language specified with the **Content-Type** parameter overrides the value of this parameter; any content items
38+
* that specify a different language are ignored. Omit the **Content-Type** parameter to base the language on the most
39+
* prevalent specification among the content items; again, content items that specify a different language are
40+
* ignored. You can specify any combination of languages for the input and response content.
4141
*/
4242
public interface Language {
4343
/** ar. */
@@ -237,7 +237,8 @@ public Builder newBuilder() {
237237
/**
238238
* Gets the content.
239239
*
240-
* Content that is to be analyzed. The service supports up to 20 MB of content for all items combined.
240+
* The content that is to be analyzed. The service supports up to 20 MB of content for all `ContentItem` objects
241+
* combined.
241242
*
242243
* @return the content
243244
*/
@@ -248,7 +249,7 @@ public String content() {
248249
/**
249250
* Gets the id.
250251
*
251-
* Unique identifier for this content item.
252+
* A unique identifier for this content item.
252253
*
253254
* @return the id
254255
*/
@@ -259,7 +260,7 @@ public String id() {
259260
/**
260261
* Gets the created.
261262
*
262-
* Timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX Epoch
263+
* A timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX Epoch
263264
* (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
264265
*
265266
* @return the created
@@ -271,8 +272,8 @@ public Long created() {
271272
/**
272273
* Gets the updated.
273274
*
274-
* Timestamp that identifies when this content was last updated. Specify a value in milliseconds since the UNIX Epoch
275-
* (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
275+
* A timestamp that identifies when this content was last updated. Specify a value in milliseconds since the UNIX
276+
* Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
276277
*
277278
* @return the updated
278279
*/
@@ -283,8 +284,8 @@ public Long updated() {
283284
/**
284285
* Gets the contenttype.
285286
*
286-
* MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is analyzed;
287-
* plain text is processed as submitted.
287+
* The MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is
288+
* analyzed; plain text is processed as submitted.
288289
*
289290
* @return the contenttype
290291
*/
@@ -295,12 +296,12 @@ public String contenttype() {
295296
/**
296297
* Gets the language.
297298
*
298-
* Language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is `en`
299+
* The language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is `en`
299300
* (English). Regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. A
300-
* language specified with the `Content-Type` header overrides the value of this parameter; any content items that
301-
* specify a different language are ignored. Omit the `Content-Type` header to base the language on the most prevalent
302-
* specification among the content items; again, content items that specify a different language are ignored. You can
303-
* specify any combination of languages for the input and response content.
301+
* language specified with the **Content-Type** parameter overrides the value of this parameter; any content items
302+
* that specify a different language are ignored. Omit the **Content-Type** parameter to base the language on the most
303+
* prevalent specification among the content items; again, content items that specify a different language are
304+
* ignored. You can specify any combination of languages for the input and response content.
304305
*
305306
* @return the language
306307
*/
@@ -311,7 +312,7 @@ public String language() {
311312
/**
312313
* Gets the parentid.
313314
*
314-
* Unique ID of the parent content item for this item. Used to identify hierarchical relationships between
315+
* The unique ID of the parent content item for this item. Used to identify hierarchical relationships between
315316
* posts/replies, messages/replies, and so on.
316317
*
317318
* @return the parentid

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/Profile.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public interface ProcessedLanguage {
4545
@SerializedName("word_count_message")
4646
private String wordCountMessage;
4747
private List<Trait> personality;
48-
private List<Trait> values;
4948
private List<Trait> needs;
49+
private List<Trait> values;
5050
private List<Behavior> behavior;
5151
@SerializedName("consumption_preferences")
5252
private List<ConsumptionPreferencesCategory> consumptionPreferences;
@@ -66,7 +66,7 @@ public String getProcessedLanguage() {
6666
/**
6767
* Gets the wordCount.
6868
*
69-
* The number of words that were found in the input.
69+
* The number of words from the input that were used to produce the profile.
7070
*
7171
* @return the wordCount
7272
*/
@@ -89,7 +89,8 @@ public String getWordCountMessage() {
8989
/**
9090
* Gets the personality.
9191
*
92-
* Detailed results for the Big Five personality characteristics (dimensions and facets) inferred from the input text.
92+
* A recursive array of `Trait` objects that provides detailed results for the Big Five personality characteristics
93+
* (dimensions and facets) inferred from the input text.
9394
*
9495
* @return the personality
9596
*/
@@ -98,25 +99,25 @@ public List<Trait> getPersonality() {
9899
}
99100

100101
/**
101-
* Gets the values.
102+
* Gets the needs.
102103
*
103104
* Detailed results for the Needs characteristics inferred from the input text.
104105
*
105-
* @return the values
106+
* @return the needs
106107
*/
107-
public List<Trait> getValues() {
108-
return values;
108+
public List<Trait> getNeeds() {
109+
return needs;
109110
}
110111

111112
/**
112-
* Gets the needs.
113+
* Gets the values.
113114
*
114115
* Detailed results for the Values characteristics inferred from the input text.
115116
*
116-
* @return the needs
117+
* @return the values
117118
*/
118-
public List<Trait> getNeeds() {
119-
return needs;
119+
public List<Trait> getValues() {
120+
return values;
120121
}
121122

122123
/**
@@ -135,7 +136,7 @@ public List<Behavior> getBehavior() {
135136
/**
136137
* Gets the consumptionPreferences.
137138
*
138-
* If the `consumption_preferences` query parameter is `true`, detailed results for each category of consumption
139+
* If the **consumption_preferences** parameter is `true`, detailed results for each category of consumption
139140
* preferences. Each element of the array provides information inferred from the input text for the individual
140141
* preferences of that category.
141142
*

0 commit comments

Comments
 (0)