Put intelligence APIs to work, Full library for microsoft cognitive services
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.
Name | Link | Library info | Reference | Coverage percent |
---|---|---|---|---|
Computer vision | link | see | ||
Emotion | link | see | ||
Face | link | see | ||
Spell check | link | see | ||
Academic | link | see |
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)
}
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)
}
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)
}
}
go get github.com/ahmdrz/microsoft-cognitive-services/academic
Sample
Under Construction 😄
Visit license file
Help me to improve it by pull requests.