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)

Next Steps