api

package
v0.0.0-...-120b264 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package api defines the interface for requests to the language model.

Index

Constants

View Source
const (
	CharTrigramURL = "/chartrigram"
	TrigramURL     = "/trigram"
)

Default paths for the different api requests.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharTrigramMatch

type CharTrigramMatch struct {
	NGram string
	Count uint64
}

CharTrigramMatch defines a (string, uint64) match pair.

type CharTrigramRequest

type CharTrigramRequest struct {
	Q     string
	Regex bool
}

CharTrigramRequest defines the data for a request for character 3-grams.

type CharTrigramResponse

type CharTrigramResponse struct {
	CharTrigramRequest
	Total   uint64
	Matches []CharTrigramMatch
}

CharTrigramResponse defines the data for the response of a request for character 3-grams.

type TrigramRequest

type TrigramRequest struct {
	F, S, T string
}

TrigramRequest defines the data for a request for token n-grams.

type TrigramResponse

type TrigramResponse struct {
	TrigramRequest
	Total   uint64
	Matches interface{}
}

TrigramResponse defines the data for the respones of a request for token n-grams.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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