public class PersonalityInsights extends WatsonService
MESSAGE_CODE, MESSAGE_ERROR, VERSION| Constructor and Description |
|---|
PersonalityInsights()
Instantiates a new Personality Insights service.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<Profile> |
getProfile(ProfileOptions options)
Returns a
Profile with a tree of characteristics that include personality, needs, and
values. |
ServiceCall<Profile> |
getProfile(String text)
Accepts text and responds with a
Profile with a tree of characteristics that include
personality, needs, and values. |
ServiceCall<String> |
getProfileAsCSV(ProfileOptions options,
boolean includeHeaders)
Returns a CSV profile.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringpublic PersonalityInsights()
public ServiceCall<Profile> getProfile(String text)
Profile with a tree of characteristics that include
personality, needs, and values.
PersonalityInsights service = new PersonalityInsights();
service.setUsernameAndPassword("username", "password");
String text = "write the text with at least 100 unique words here..."
Profile profile = service.getProfile(text).execute();
System.out.println(profile);
text - Text to analyzeProfilepublic ServiceCall<Profile> getProfile(ProfileOptions options)
Profile with a tree of characteristics that include personality, needs, and
values. ProfileOptions:
PersonalityInsights service = new PersonalityInsights();
service.setUsernameAndPassword("username", "password");
String text = "write the text with at least 100 unique words here..."
ContentItem cItem = new ContentItem().content(text).created(new Date());
ProfileOptions options = new ProfileOptions().contentItems(Arrays.asList(cItem));
Profile profile = service.getProfile(options).execute();
System.out.println(profile);
options - the ProfileOptionsProfilepublic ServiceCall<String> getProfileAsCSV(ProfileOptions options, boolean includeHeaders)
options - the ProfileOptionsincludeHeaders - if true returns the CSV headersCopyright © 2015–2016. All rights reserved.