Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 2.45 KB

File metadata and controls

56 lines (45 loc) · 2.45 KB

Ruby Client for Google Cloud Natural Language API (Alpha)

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.

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Google Cloud Natural Language API.
  4. 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)

Supported Ruby Versions

This library is supported on Ruby 2.0+.

However, Ruby 2.3 or later is strongly recommended, as earlier releases have reached or are nearing end-of-life. After June 1, 2018, Google will provide official support only for Ruby versions that are considered current and supported by Ruby Core (that is, Ruby versions that are either in normal maintenance or in security maintenance). See https://www.ruby-lang.org/en/downloads/branches/ for further details.

Next Steps