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

Implement Natural Language Service #828

Closed
1 of 6 tasks
blowmage opened this issue Aug 15, 2016 · 2 comments
Closed
1 of 6 tasks

Implement Natural Language Service #828

blowmage opened this issue Aug 15, 2016 · 2 comments
Assignees
Labels
api: language Issues related to the Cloud Natural Language API API.

Comments

@blowmage
Copy link
Contributor

blowmage commented Aug 15, 2016

Implement the Natural Language service. The implementation should use the GAX middleware. The Ruby API should be similar to Vision, by allowing multiple features to be run at once, or individual features to be run on a Document object.

gcloud = Google::Cloud.new
language = gcloud.language

# Run annotations on a Document object
doc = language.document "Blah blah blah", language: :en
# Run just syntax annotation
syntax = doc.syntax
# Run just entities annotation
entities = doc.entities
# Run just sentiment annotation
sentiment = doc.sentiment

# Run all annotations (syntax, entities, sentiment) in a single call
annotations = language.annotate doc, encoding: :utf8

# Run only syntax annotation, passing in content instead of Document
annotations = language.annotate "Blah <b>blah</b> blah", syntax: true, format: :html

# Run just entities and sentiment annotations for Storage File
file = gcloud.storage.bucket("my_bucket").file("content.html")
annotations = language.annotate file, entities: true, sentiment: true
entities = annotations.entities
sentiment = annotations.sentiment

Here are some remaining tasks, not all are needed for release.

  • Documentation pass!
  • Enable retries configuration
  • Check content string encoding, possibly auto-convert if not a supported encoding?
  • Validate encoding optional argument is one of the supported enum values
  • Add Token#part_of_speech helpers?
  • Add Token#label helpers?
@blowmage blowmage added the api: language Issues related to the Cloud Natural Language API API. label Aug 15, 2016
@quartzmo quartzmo modified the milestone: Natural Language Aug 18, 2016
quartzmo added a commit that referenced this issue Aug 23, 2016
@blowmage
Copy link
Contributor Author

I think we may have to release without the retry configuration settled. See #848 and #849.

quartzmo added a commit to quartzmo/google-cloud-ruby that referenced this issue Aug 26, 2016
quartzmo added a commit to quartzmo/google-cloud-ruby that referenced this issue Aug 26, 2016
quartzmo added a commit to quartzmo/google-cloud-ruby that referenced this issue Aug 26, 2016
@blowmage
Copy link
Contributor Author

This was released Friday in v0.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: language Issues related to the Cloud Natural Language API API.
Projects
None yet
Development

No branches or pull requests

2 participants