client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegisteredHandlers []Handler

RegisteredHandlers Array containing all Handlers

Functions

func RegisterHandler

func RegisterHandler(filter Filter, do CallFunc)

RegisterHandler Called at initialization

Types

type CallFunc

type CallFunc func(ctx context.Context, result *Result) error

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client julius client structure

func NewClient

func NewClient(network, address string) (*Client, error)

NewClient create new Client

func (*Client) Run

func (c *Client) Run()

Run starting connection

type Detail

type Detail struct {
	Word    string
	ClassID string
	Phone   string
	CM      string
}

type Filter

type Filter func(ctx context.Context, result *Result) bool

type Handler

type Handler struct {
	Filter Filter   // ShouldExec Returns whether the handler should be executed or not.
	Do     CallFunc // Do called function
}

Handler structure for handling

type Result

type Result struct {
	Rank    string
	Score   string
	Gram    string
	Details []Detail
}

specification: https://julius.osdn.jp/juliusbook/ja/desc_module.html

Jump to

Keyboard shortcuts

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