spell

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.cognitive.microsoft.com/bing/v5.0"
	MODE_SPELL string = "spell"
	MODE_PROOF string = "proof"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

type FlaggedToken

type FlaggedToken struct {
	Offset      int       `json:"offset"`
	Token       string    `json:"token"`
	Type        string    `json:"type"`
	Suggestions []Suggest `json:"suggestions"`
}

type Result

type Result struct {
	Type          string         `json:"_type"`
	FlaggedTokens []FlaggedToken `json:"flaggedTokens"`
}

type Spell

type Spell struct {
	BingKey       string
	LastRequestID string
}

func New

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

func (*Spell) Check

func (spell *Spell) Check(word string, mode string) (Result, error)

type Suggest

type Suggest struct {
	Suggestion string `json:"suggestion"`
	Score      int    `json:"score"`
}

Jump to

Keyboard shortcuts

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