Skip to content
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

[NL] v1 and v1beta2 updates #470

Merged
merged 9 commits into from
Sep 19, 2017
Merged

[NL] v1 and v1beta2 updates #470

merged 9 commits into from
Sep 19, 2017

Conversation

jmdobry
Copy link
Member

@jmdobry jmdobry commented Aug 30, 2017

  • - move entity-level sentiment samples to v1
  • - add text classification
  • - [BLOCKED] update to newest @google-cloud/language package

@jmdobry jmdobry self-assigned this Aug 30, 2017
@jmdobry jmdobry requested a review from dizcology August 30, 2017 20:36
@codecov
Copy link

codecov bot commented Aug 30, 2017

Codecov Report

Merging #470 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #470   +/-   ##
=======================================
  Coverage   97.16%   97.16%           
=======================================
  Files          13       13           
  Lines         458      458           
=======================================
  Hits          445      445           
  Misses         13       13

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e83f4c1...27d7bca. Read the comment docs.

@jmdobry jmdobry changed the title [NL] Move entity-level sentiment samples to v1. [NL] v1 and v1beta2 updates Aug 31, 2017
node analyze.v1beta2.js entity-sentiment-text "President Obama is speaking at the White House."
node analyze.v1beta2.js entity-sentiment-file my-bucket Detects sentiment of entities in gs://my-bucket/file.txt
file.txt
node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is too short - currently the API requires 20 tokens to return non-empty results. This limitation might be improved in the future but let's use a longer piece of text for the sample just in case.

function analyzeEntitySentimentOfText (text) {
// [START language_entity_sentiment_string]
// Imports the Google Cloud client library
const language = require('@google-cloud/language').v1beta2();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to v1.

function analyzeEntitySentimentInFile (bucketName, fileName) {
// [START language_entity_sentiment_file]
// Imports the Google Cloud client library
const language = require('@google-cloud/language').v1beta2();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to v1.

const Language = require('@google-cloud/language');

// Creates a client
const language = Language.v1beta2();

// The text to analyze, e.g. "Hello, world!"
// const text = 'Hello, world!';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably use a longer text here too.

const Language = require('@google-cloud/language');

// Creates a client
const language = Language.v1beta2();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering what's the difference between these two ways of creating a client?

const Language = require('@google-cloud/language');
const language = Language({ apiVersion: 'v1beta2' });

vs

const Language = require('@google-cloud/language');
const language = Language.v1beta2();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one uses the generated v1 client, but points it add the v1beta2 service endpoint. The second one uses the generated v1beta2 client (which points at the v1beta2 service endpoint by default).

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@gguuss
Copy link
Contributor

gguuss commented Sep 19, 2017

@jmdobry /fyi squashing and merging, @jabubake and I are covered under the CLA

@gguuss gguuss merged commit 5468b07 into master Sep 19, 2017
@gguuss gguuss deleted the nl branch September 19, 2017 15:54
NimJay pushed a commit that referenced this pull request Nov 10, 2022
* Move entity-level sentiment samples to v1.

* Add text classification.

* Adds longer text to README.
NimJay pushed a commit that referenced this pull request Nov 10, 2022
* Move entity-level sentiment samples to v1.

* Add text classification.

* Adds longer text to README.
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* chore(main): release 3.0.4

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* chore(main): release 3.0.4

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* chore(main): release 3.0.4

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 15, 2022
* chore(main): release 3.0.4

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
telpirion pushed a commit that referenced this pull request Nov 16, 2022
unforced pushed a commit that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [5.10.0](googleapis/nodejs-security-center@v5.9.0...v5.10.0) (2022-04-11)


### Features

* Add iam_binding field to findings attributes. It represents particular IAM bindings, which captures a member's role addition, removal, or state ([#474](googleapis/nodejs-security-center#474)) ([b29893c](googleapis/nodejs-security-center@b29893c))
* Add next_steps field to finding's list of attributes ([#476](googleapis/nodejs-security-center#476)) ([326e8d2](googleapis/nodejs-security-center@326e8d2))
* AuditConfig for IAM v1 ([#470](googleapis/nodejs-security-center#470)) ([2ec070f](googleapis/nodejs-security-center@2ec070f))

---
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants