Conversation
…ration tests, and adds verbose comments on mock entities.
language/analysis/README.md
Outdated
| We can then run the assembled JAR file with the `java` command. The variable $COMMAND takes | ||
| three values `entities`, `sentiment` or `syntax`. | ||
| six values `entities-text`, `entities-file`, `sentiment-text`, `sentiment-file`, | ||
| `syntax-text`, or `syntax-file`. |
There was a problem hiding this comment.
Oi. Perhaps would be cleaner to just detect a gcs uri? As in:
if (command.equals("entities")) {
if (text.startsWith("gs://")) {
app.analyzeEntitiesFile(text);
} else {
app.analyzeEntitiesText(text);
}
} // ... etcinside Analyze.java
There was a problem hiding this comment.
That would moves us toward writing library code in the snippets, and the other 6 languages have separate snippets for raw strings vs gcs files, so Java would need to do the same to fit into the docs where the other snippets live.
There was a problem hiding this comment.
I think he just means in the command parser, I am in favor of simplifying the args parser for a lighter-weight usage string.
| return response.getEntitiesList(); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
Perhaps:
* Gets {@link Entity}s from the contents of the object at the given GCS {@code path}
Otherwise it sounds like it's looking for entities in the path string itself. (here and below)
|
|
||
| // Assert | ||
| assertThat((double)sentiment.getMagnitude()).isGreaterThan(1.0); | ||
| assertThat((double)sentiment.getScore()).isWithin(0.0); |
There was a problem hiding this comment.
Seems a bit brittle, no? Perhaps isWithin(0.1)?
lesv
left a comment
There was a problem hiding this comment.
LGTM - though shouldn't we have used "${QUOTE}" https://google.github.io/styleguide/shell.xml#Use_Local_Variables ?? (in your README.md)
|
Sorry for merging a little aggressively and good catch - I'll fix the style for shell variables in a separate PR if that works. Should we also be making |
|
I think that's more inline with the style guide. (ie. YES) |
|
SGTM. |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [junit:junit](http://junit.org) ([source](https://togithub.com/junit-team/junit4)) | `4.13.1` -> `4.13.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dialogflow).
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [junit:junit](http://junit.org) ([source](https://togithub.com/junit-team/junit4)) | `4.13.1` -> `4.13.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dialogflow).
🤖 I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Adds Google Cloud Storage (GCS) examples and tests to be at parity with other samples for inclusion in snippets.