Uh oh!
There was an error while loading. Please reload this page.
Add Cloud Client NL API samples. - #668
Merged
Merged
Conversation
jmdobry
commented
Nov 17, 2016
MemberAuthor
Blocked by googleapis/google-cloud-python#2747 |
theacodes
suggested changes
Nov 17, 2016
| for entity in entities: | ||
| print('=' * 20) | ||
| print(' name: %s' % (entity.name,)) |
Contributor
There was a problem hiding this comment.
don't use %,
also, you could do:
print('name: {:>10}'.format(entity.name))MemberAuthor
There was a problem hiding this comment.
Oops, copied this from the google-cloud-python docs. Fixed.
| @@ -0,0 +1,54 @@ | |||
| # -*- coding: utf-8 -*- | |||
Contributor
There was a problem hiding this comment.
This shouldn't be needed (this file contains no extended unicode characters)
gguuss
previously requested changes
Dec 2, 2016
gguuss
left a comment
Contributor
There was a problem hiding this comment.
Looks like you're still using polarity, please replace all instances with sentiment score.
| def test_entities_file(cloud_config, capsys): | ||
| snippets.entities_file('gs://bucket/file.txt') | ||
| out, _ = capsys.readouterr() | ||
| assert 'Polarity: 1' in out |
| def test_syntax_text(cloud_config, capsys): | ||
| snippets.syntax_text('Hello, world!') | ||
| out, _ = capsys.readouterr() | ||
| assert 'Polarity: 1' in out |
| def test_sentiment_text(cloud_config, capsys): | ||
| snippets.sentiment_text('Hello, world!') | ||
| out, _ = capsys.readouterr() | ||
| assert 'Polarity: 1' in out |
| # document.doc_type == language.Document.HTML | ||
| sentiment = document.analyze_sentiment() | ||
| print('Polarity: {}'.format(sentiment.polarity)) |
jmdobryforce-pushed
the
language-samples
branch
2 times, most recently
from
December 6, 2016 18:23
7933caf to
2a15659Comparejmdobry
commented
Dec 6, 2016
MemberAuthor
Ready for final review. Need |
theacodes
approved these changes
Dec 6, 2016
theacodesforce-pushed
the
language-samples
branch
from
December 6, 2016 20:55
786ee57 to
a06ce1bComparehkdevandla pushed a commit
to hkdevandla/python-language
that referenced
this pull request
Sep 26, 2020
busunkim96 pushed a commit
to googleapis/python-language
that referenced
this pull request
Sep 29, 2020
m-strzelczyk pushed a commit
that referenced
this pull request
Nov 18, 2022
8 tasks
parthea pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
Jul 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.