cschomburg / know

A Go package to query different knowledge providers (Google, Wolfram Alpha, ...).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

know

API Documentation MIT License

Package know queries different knowledge providers and parses their result. Partially supported are currently Google and Wolfram Alpha.

Installation

go get github.com/xconstruct/know

Example

answers, errs := know.Ask("What is the capital of germany?")

// Get first answer
ans, ok := <-answers
if !ok {
	fmt.Println("No answer found!")
	for err := range errs {
		fmt.Println(err)
	}
	return
}
fmt.Println(ans.Question, "is", ans.Answer)
// Output:
// Germany, Capital is Berlin

About

A Go package to query different knowledge providers (Google, Wolfram Alpha, ...).

License:MIT License


Languages

Language:Go 100.0%