GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add GCS examples for Natural Language by gguuss · Pull Request #432 · GoogleCloudPlatform/java-docs-samples

Conversation

@gguuss

@gguuss gguuss commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

Adds Google Cloud Storage (GCS) examples and tests to be at parity with other samples for inclusion in snippets.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gguuss added 6 commits November 28, 2016 11:21
@gguuss
Updates to new client library and fixes broken link in README
81d550f
@gguuss
Fixes error on test
4baae60
@gguuss
Fixes type in test assertion
a5f7fc0
@gguuss
Removes extraneous createService method, reduces line length in integ…
bd07872
…ration tests, and adds verbose comments on mock entities.
@gguuss
Adds GCS filepath snippets and tests
c701f29
@gguuss
merge with master, remove tabs inserted by Eclipse
dbe274f
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 2, 2016
@gguuss gguuss assigned jerjou Dec 2, 2016
jerjou
jerjou suggested changes Dec 2, 2016
View reviewed changes
Comment thread 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`.

@jerjou jerjou Dec 2, 2016

Copy link
Copy Markdown
Contributor

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.

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);
  }
} // ... etc

inside Analyze.java

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jmdobry jmdobry Dec 2, 2016

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Dec 2, 2016

Copy link
Copy Markdown
Contributor Author

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 he just means in the command parser, I am in favor of simplifying the args parser for a lighter-weight usage string.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Dec 2, 2016

Copy link
Copy Markdown
Contributor Author

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.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jerjou jerjou Dec 2, 2016

Copy link
Copy Markdown
Contributor

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.

Yup - yay!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread language/analysis/src/main/java/com/google/cloud/language/samples/Analyze.java
return response.getEntitiesList();
}

/**

@jerjou jerjou Dec 2, 2016

Copy link
Copy Markdown
Contributor

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.

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Dec 2, 2016

Copy link
Copy Markdown
Contributor Author

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.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread language/analysis/src/test/java/com/google/cloud/language/samples/AnalyzeIT.java Outdated

// Assert
assertThat((double)sentiment.getMagnitude()).isGreaterThan(1.0);
assertThat((double)sentiment.getScore()).isWithin(0.0);

@jerjou jerjou Dec 2, 2016

Copy link
Copy Markdown
Contributor

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.

Seems a bit brittle, no? Perhaps isWithin(0.1)?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Dec 2, 2016

Copy link
Copy Markdown
Contributor Author

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.

Ack, changed to 0.1

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gguuss
Cleaner arguments, better comments, and less brittle tests
cc6ec31
jerjou
jerjou approved these changes Dec 2, 2016
View reviewed changes

@jerjou jerjou left a comment

Copy link
Copy Markdown
Contributor

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.

@lesv FYI

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jmdobry
jmdobry approved these changes Dec 3, 2016
View reviewed changes
@gguuss
gguuss merged commit 7770807 into master Dec 5, 2016
@gguuss
gguuss deleted the language-gcs branch December 5, 2016 21:32
lesv
lesv reviewed Dec 5, 2016
View reviewed changes

@lesv lesv left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM - though shouldn't we have used "${QUOTE}" https://google.github.io/styleguide/shell.xml#Use_Local_Variables ?? (in your README.md)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gguuss

gguuss commented Dec 5, 2016

Copy link
Copy Markdown
Contributor Author

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 $JAR_FILE and $MAIN_CLASS local variables as well?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lesv

lesv commented Dec 5, 2016

Copy link
Copy Markdown
Contributor

I think that's more inline with the style guide. (ie. YES)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gguuss

gguuss commented Dec 5, 2016

Copy link
Copy Markdown
Contributor Author

SGTM.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Shabirmean pushed a commit that referenced this pull request Nov 14, 2022
@renovate-bot
test(deps): update dependency junit:junit to v4.13.2 (#432)
0f37854
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](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` | [![age](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/compatibility-slim/4.13.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/confidence-slim/4.13.1)](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).
@Shabirmean Shabirmean mentioned this pull request Nov 15, 2022
samples: migrate code from googleapis/java-dialogflow #7420
Merged
9 tasks
Shabirmean pushed a commit that referenced this pull request Nov 15, 2022
@renovate-bot @Shabirmean
test(deps): update dependency junit:junit to v4.13.2 (#432)
30236c8
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](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` | [![age](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/compatibility-slim/4.13.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/confidence-slim/4.13.1)](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).
Sita04 pushed a commit that referenced this pull request Feb 7, 2023
@release-please
chore(master): release 2.2.8-SNAPSHOT (#432)
e564a0d
🤖 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jmdobry jmdobry jmdobry approved these changes
+2 more reviewers
@lesv lesv lesv left review comments
@jerjou jerjou jerjou approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@jerjou jerjou

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@gguuss @lesv @jerjou @jmdobry @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.