Ruby Client for Google Cloud Natural Language API (Beta)
Google Cloud Natural Language API:
Google Cloud Natural Language API provides natural language understanding
technologies to developers. Examples include sentiment analysis, entity
recognition, and text annotations.
The 0.28.0 release introduced breaking changes relative to the previous
release, 0.27.1. For more details and instructions to migrate your code, please
visit the migration guide.
Quick Start
In order to use this library, you first need to go through the following
steps:
- Select or create a Cloud Platform project.
- Enable the Google Cloud Natural Language API.
- Setup Authentication.
Installation
$ gem install google-cloud-language
Preview
LanguageServiceClient
require "google/cloud/language"
language_service_client = Google::Cloud::Language.new
content = "Hello, world!"
type = :PLAIN_TEXT
document = { content: content, type: type }
response = language_service_client.analyze_sentiment(document)Next Steps
- Read the Client Library Documentation for Google Cloud Natural Language API
to see other available methods on the client. - Read the Google Cloud Natural Language API Product documentation
to learn more about the product and see How-to Guides. - View this repository's main README
to see the full list of Cloud APIs that we cover.