Cognitive Services Java SDK Samples

These samples will get you started using the Java SDKs for various Cognitive Services. They'll cover a few common use cases that are end-to-end solutions, including best practices for interacting with the data from these APIs.

For quickstart versions of many of these samples (and for more examples not covered here), view the cognitive-services-quickstart-code repo for Java. This repo demonstrates short "snippets" of code that back up many of the quickstarts in the Cognitive Services documentation pages.

For a general overview about Cognitive Services, view What are Azure Cognitive Services?.

NOTE: QUICKSTARTS ARE BEING MOVED HERE: https://github.com/Azure-Samples/cognitive-services-quickstart-code/tree/master/java

Features

This project framework provides examples for the following services:

Language

Vision

Getting Started

Prerequisites

  1. A cognitive services API key and/or endpoint with which to authenticate the SDK's calls. If you don't have an Azure account, you can visit the Microsoft Cognitive Services Web site, create a new Azure account, and try Cognitive Services for free. Or follow the Create a Cognitive Services resource using the Azure portal guide. You can create a Cognitive Services account on the Azure portal through the Use with an Azure subscription button.
  2. JDK 7 or 8

Subscription keys are usually per service. For example, the subscription key for Spell Check will not be the same as it is for Custom Search.

Installation

Copy this repository to your local machine by typing

git clone https://github.com/Azure-Samples/cognitive-services-java-sdk-samples.git

in your command line/bash. Or download and open the zip file of this repo.

Quickstart

In each sample you will need your subscription key and/or endpoint from your Azure Portal resource for the service. In the beginning of each sample, add your subscription key/endpoint where applicable.

Resources