Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1.06 KB

File metadata and controls

30 lines (19 loc) · 1.06 KB

Getting Started with Google Cloud Natural Language API and the Google Cloud Client libraries

Google Cloud Natural Language API provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger collection of Cloud Machine Learning APIs.

These sample Java applications demonstrate how to access the Cloud Natural Language API using the Google Cloud Client Library for Java.

Quickstart

Install Maven.

Build your project with:

mvn clean package -DskipTests

You can then run a given ClassName via:

mvn exec:java -Dexec.mainClass=com.example.language.ClassName \
    -DpropertyName=propertyValue \
	-Dexec.args="arg1 'arg 2' arg3"

Analyze a string for sentiment (using the quickstart sample)

mvn exec:java -Dexec.mainClass=com.example.language.QuickstartSample