-
Notifications
You must be signed in to change notification settings - Fork 532
Adds Natural Language Understanding and fix a few bugs in the process #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* | ||
* @return the limit | ||
*/ | ||
public Integer getLimit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getter name should be "limit" rather than "getLimit".
* | ||
* @return the text | ||
*/ | ||
public String getText() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getter methods should be "text", "relevance", rather than "getText", "getRelevance".
/** | ||
* Whether or not to return emotion analysis of the content. | ||
*/ | ||
public class EmotionOptions extends GenericModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class should have a builder.
* | ||
* @return the document | ||
*/ | ||
public DocumentEmotionResults getDocument() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getter methods should be "document", "targets" rather than "getDocument", "getTargets".
I'll stop commenting on this now. It just needs to be changed throughout.
/** | ||
* Whether or not to return important people, places, geopolitical, and other entities detected in the analyzed content. | ||
*/ | ||
public class EntitiesOptions extends GenericModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class should have a builder.
/** | ||
* An option indicating whether or not important keywords from the analyzed content should be returned. | ||
*/ | ||
public class KeywordsOptions extends GenericModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class should have a builder.
private String status; | ||
/** Unique model ID. */ | ||
@SerializedName("model_id") | ||
private String modelID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the convention in the Java SDK is to use "Id" rather than "ID" (this differs from Swift by the way). So to adhere to that convention, this variable and its associated getters/setters should use "Id".
* | ||
* @return the document | ||
*/ | ||
public Boolean isDocument() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the "is" prefix on this getter? It seems to break the convention of just using the name for getters -- even for boolean values.
return targets; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not want setters in this class, right?
* | ||
* @return the sentiment | ||
*/ | ||
public Boolean isSentiment() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't want "is" in the getter name here.
return emotion; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not want setters in this class.
* | ||
* @return the sentiment | ||
*/ | ||
public Boolean isSentiment() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want "is" in these getter names.
return emotion; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want setters in this class.
/** | ||
* An option specifying if the relationships found between entities in the analyzed content should be returned. | ||
*/ | ||
public class RelationsOptions extends GenericModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class should have a builder.
return model; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want setters in this class.
/** | ||
* An option specifying whether or not to identify the subjects, actions, and verbs in the analyzed content. | ||
*/ | ||
public class SemanticRolesOptions extends GenericModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want a builder for this class.
* | ||
* @return the keywords | ||
*/ | ||
public Boolean isKeywords() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want "is" in this getter name.
return entities; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want setters in this class.
/** | ||
* An option specifying if sentiment of detected entities, keywords, or phrases should be returned. | ||
*/ | ||
public class SentimentOptions extends GenericModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want a builder for this class.
* | ||
* @return the document | ||
*/ | ||
public Boolean isDocument() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want "is" in the getter name here.
return targets; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want setters in this class.
Summary
android-utils
tobuild.gradle
build.gradle
to the examplesI will merge and do a release after that I fix #610