Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CommandName = "server" Description = `run tokenize server` )
subcommand property
View Source
var Stderr io.Writer = os.Stderr
Stderr is the standard error writer.
Functions ¶
func OptionCheck ¶
OptionCheck receives a slice of args and returns an error if it was not successfully parsed
func PrintDefaults ¶
func PrintDefaults(eh flag.ErrorHandling)
PrintDefaults prints out the default flags
Types ¶
type TokenizeDemoHandler ¶
type TokenizeDemoHandler struct {
// contains filtered or unexported fields
}
TokenizeDemoHandler represents the tokenizer demo server struct.
func (*TokenizeDemoHandler) ServeHTTP ¶
func (h *TokenizeDemoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serves a tokenize demo server.
type TokenizeHandler ¶
type TokenizeHandler struct {
// contains filtered or unexported fields
}
TokenizeHandler represents the tokenizer API server struct
func (*TokenizeHandler) ServeHTTP ¶
func (h *TokenizeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TokenizerRequestBody ¶ added in v2.6.4
type TokenizerRequestBody struct { Input string `json:"sentence"` Mode string `json:"mode,omitempty"` }
TokenizerRequestBody is the type of the "tokenize" endpoint HTTP request body.
type TokenizerResponseBody ¶ added in v2.6.4
type TokenizerResponseBody struct { Status bool `json:"status"` Tokens []tokenizer.TokenData `json:"tokens"` }
TokenizerResponseBody is the response type of the "tokenize" endpoint.
Click to show internal directories.
Click to hide internal directories.