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 sample for Natural Language 1.1 launch by ace-n · Pull Request #352 · GoogleCloudPlatform/nodejs-docs-samples

Conversation

@ace-n

@ace-n ace-n commented Apr 14, 2017

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

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

All reactions
@ace-n
ace-n requested review from gguuss and jmdobry April 14, 2017 09:56
jmdobry
jmdobry approved these changes Apr 14, 2017
View reviewed changes
jmdobry
jmdobry requested changes Apr 14, 2017
View reviewed changes

@jmdobry jmdobry left a comment

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.

Let's add NL 1.0 changes to this PR

Sorry, something went wrong.

Uh oh!

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

All reactions
@ace-n

ace-n commented Apr 14, 2017

Copy link
Copy Markdown
Contributor Author

Also - per @gguuss, these changes may not be in production for everyone yet. Holding off on them for now.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ace-n ace-n added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 14, 2017
Ace Nassri added 3 commits April 20, 2017 13:35
Ace Nassri
Fix NL tests
30b4da8
Ace Nassri
Add analyzeEntitySentiment sample
55e5daf
Ace Nassri
Fix failing tests
3cbd0af
@ace-n
ace-n force-pushed the nl-1-1 branch from 8844534 to 3cbd0af Compare April 20, 2017 20:36
gguuss
gguuss reviewed Apr 20, 2017
View reviewed changes

@gguuss gguuss 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.

This is suspect, any reason the 0th result is not getting returned?

Sorry, something went wrong.

Uh oh!

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

All reactions
gguuss
gguuss reviewed Apr 20, 2017
View reviewed changes
Comment thread language/analyze.js
document.detectSentiment()
.then((results) => {
const sentiment = results[0];
const sentiment = results[1].documentSentiment;

@gguuss gguuss Apr 20, 2017

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.

Is it just that the first result is missing sentiment? I'm seeing that not all the entities returned have sentiment.

Sorry, something went wrong.

Uh oh!

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

All reactions
gguuss
gguuss approved these changes Apr 20, 2017
View reviewed changes

@gguuss gguuss 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, also IMO it's ok to publish if this doesn't affect the v1 sample.

Sorry, something went wrong.

Uh oh!

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

All reactions
Ace Nassri added 2 commits April 21, 2017 13:59
Ace Nassri
Add NL 1.0 features
3784441
Ace Nassri
Update dependencies
edb7988
@ace-n
ace-n requested a review from sgreenberg April 21, 2017 21:06
jmdobry
jmdobry approved these changes Apr 21, 2017
View reviewed changes
@jmdobry jmdobry removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 21, 2017
@jmdobry
jmdobry merged commit 9c0d258 into master Apr 21, 2017
@jmdobry
jmdobry deleted the nl-1-1 branch April 21, 2017 22:10
gguuss
gguuss reviewed Apr 28, 2017
View reviewed changes
Comment thread language/analyze.js
const entities = results[0].entities;

console.log(`Entities and sentiments:`)
entities.forEach((entity) => {

@gguuss gguuss Apr 28, 2017

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.

Don't forget the mentions in entity sentiment:

from Python:

    for entity in result.entities:
        print('Mentions: ')
        print(u'Name: "{}"'.format(entity.name))
        for mention in entity.mentions:
            print(u'  Begin Offset : {}'.format(mention.text.begin_offset))
            print(u'  Content : {}'.format(mention.text.content))
            print(u'  Magnitude : {}'.format(mention.sentiment.magnitude))
            print(u'  Sentiment : {}'.format(mention.sentiment.score))
            print(u'  Type : {}'.format(mention.type))
        print(u'Salience: {}'.format(entity.salience))
        print(u'Sentiment: {}\n'.format(entity.sentiment))

Sorry, something went wrong.

Uh oh!

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

All reactions
grayside pushed a commit that referenced this pull request Oct 26, 2022
@release-please
chore: release 1.7.3 (#352)
8c4c4aa
@grayside grayside mentioned this pull request Oct 26, 2022
migrate code from googleapis/nodejs-tasks #2792
Merged
grayside pushed a commit that referenced this pull request Nov 3, 2022
@release-please @grayside
chore: release 1.7.3 (#352)
ad9cb9c
NimJay pushed a commit that referenced this pull request Nov 10, 2022
Ace Nassri @jmdobry
Add sample for Natural Language 1.1 launch (#352)
e9c0f92
* Fix NL tests

* Add analyzeEntitySentiment sample

* Fix failing tests

* Add NL 1.0 features

* Update dependencies
@NimJay NimJay mentioned this pull request Nov 10, 2022
migrate code from googleapis/nodejs-language #2827
Merged
NimJay pushed a commit that referenced this pull request Nov 10, 2022
Ace Nassri @NimJay
Add sample for Natural Language 1.1 launch (#352)
833bbe9
* Fix NL tests

* Add analyzeEntitySentiment sample

* Fix failing tests

* Add NL 1.0 features

* Update dependencies
Shabirmean pushed a commit that referenced this pull request Feb 16, 2023
@release-please Benjamin E. Coe
chore: release 1.6.1 (#352)
55c392e
@Shabirmean Shabirmean mentioned this pull request Feb 16, 2023
samples: migrate code from googleapis/nodejs-dlp #3035
Merged
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
@sgreenberg sgreenberg Awaiting requested review from sgreenberg
+1 more reviewer
@gguuss gguuss gguuss approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

3 participants

@ace-n @jmdobry @gguuss
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.