academic

package
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 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL string = "https://api.projectoxford.ai/academic/v1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Academic

type Academic struct {
	BingKey       string
	LastRequestID string
}

func New

func New(key string) (*Academic, error)

func (*Academic) CalcHistogram

func (academic *Academic) CalcHistogram(expr string, order CalcHistogramRequest) (CalcHistogramResult, error)

type CalcHistogramRequest

type CalcHistogramRequest struct {
	Model      string
	Attributes string
	Count      int
	Offset     int
}

func (CalcHistogramRequest) String

func (c CalcHistogramRequest) String() string

type CalcHistogramResult

type CalcHistogramResult struct {
	Expr        string          `json:"expr"`
	NumEntities int             `json:"num_entities"`
	Histograms  []HistogramItem `json:"histograms"`
}

type Error

type Error struct {
	Code    string `json:"statusCode"`
	Message string `json:"message"`
}

type Histogram

type Histogram struct {
	Value int     `json:"value"`
	Prob  float64 `json:"prob"`
	Count int     `json:"count"`
}

type HistogramItem

type HistogramItem struct {
	Attribute      string      `json:"attribute"`
	DistinctValues int         `json:"distinct_values"`
	TotalCount     int         `json:"total_count"`
	Histogram      []Histogram `json:"histogram"`
}

Jump to

Keyboard shortcuts

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