microsoft-cognitive-services

module
v0.0.0-...-52824e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2016 License: MIT

README

microsoft-cognitive-services

Put intelligence APIs to work, Full library for microsoft cognitive services

Build Status Progress


I will improve this library just for improve my dominance on Golang.

Tap into the power of machine learning with easy-to-use REST APIs. Get started

Subscription key : Subscription key which provides access to this API. Found in your subscriptions.

List of APIs :
Name Link Library info Reference Coverage percent
Computer vision link see GoDoc Progress
Emotion link see GoDoc Progress
Face link see GoDoc Progress
Spell check link see GoDoc Progress
Academic link see GoDoc Progress

Computer Vision
  go get github.com/ahmdrz/microsoft-cognitive-services/computer-vision

Sample

// test project main.go
package main

import (
    "fmt"

    "github.com/ahmdrz/microsoft-cognitive-services/computer-vision"
)

func main() {
    fmt.Println("Hello World!")
    vis, err := vision.New("<KEY>")
    if err != nil {
        panic(err)
    }

    result, err := vis.Analyze("https://portalstoragewuprod2.azureedge.net/vision/Analysis/1.jpg",
        vision.VisualFeatures{
            Adult: true,
            Tags:  true,
        })
    if err != nil {
        panic(err)
    }

    fmt.Println(result)
}

Also you can upload your images , Here is a sample code :

// test project main.go
package main

import (
    "fmt"

    "github.com/ahmdrz/microsoft-cognitive-services/computer-vision"
)

func main() {
    fmt.Println("Hello World!")
    vis, err := vision.New("<KEY>")
    if err != nil {
        panic(err)
    }

    result, err := vis.AnalyzeFile("test.jpg",
        vision.VisualFeatures{
            Adult: true,
            Tags:  true,
        })
    if err != nil {
        panic(err)
    }

    fmt.Println(result)
}
Emotion
  go get github.com/ahmdrz/microsoft-cognitive-services/emotion

Sample

// test project main.go
package main

import (
    "fmt"

    "github.com/ahmdrz/microsoft-cognitive-services/emotion"
)

func main() {
    fmt.Println("Hello World!")
    emo, err := emotion.New("<KEY>")
    if err != nil {
        panic(err)
    }

    result, err := emo.Recognize("https://portalstoragewuprod.azureedge.net/emotion/recognition1.jpg")
    if err != nil {
        panic(err)
    }

    fmt.Println(result)
}
Face
  go get github.com/ahmdrz/microsoft-cognitive-services/face

Sample

// test project main.go
package main

import (
    "fmt"

    "github.com/ahmdrz/microsoft-cognitive-services/face"
)

func main() {
  	fmt.Println("Hello World!")
  	facevar, err := face.New("<KEY>")
	if err != nil {
		panic(err)
	}

	results, err := facevar.Detect("https://portalstoragewuprod.azureedge.net/media/Default/Documentation/Face/Images/FaceFindSimilar.QueryFace.jpg",
		face.DetectOrder{
			FaceLandmarks: true,
			FaceAttributes: face.FaceAttributesOrder{
				Age: true,
			},
		},
	)
	if err != nil {
		panic(err)
	}

	for _, result := range results {
		fmt.Println(result.FaceAttributes.Age)
	}
}
Academic
  go get github.com/ahmdrz/microsoft-cognitive-services/academic

Sample

Under Construction 😄

License

Visit license file

Contrib

Help me to improve it by pull requests.

Directories

Path Synopsis
vision project vision.go license MIT powered by github.com/ahmdrz full api reference on https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/
vision project vision.go license MIT powered by github.com/ahmdrz full api reference on https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL