Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouter ¶
func NewRouter(data *ServiceData) *mux.Router
NewRouter creates the router for HTTP service
func StartWebServer ¶
func StartWebServer(data *ServiceData) error
StartWebServer starts the HTTP service and listens for the requests
Types ¶
type DataProvider ¶
DataProvider provides data to initializer
type InputArray ¶
type InputArray struct {
Words []string `json:"input"`
}
InputArray contains punctuation input words array
type Output ¶
type Output struct { PunctuatedText string `json:"punctuatedText"` Original []string `json:"original"` Punctuated []string `json:"punctuated"` WordIDs []int32 `json:"wordIDs"` PunctIDs []int32 `json:"punctIDs"` }
Output contains punctuation output
type Punctuator ¶
Punctuator invokes TF to retrieve punctuation
type PunctuatorImpl ¶
type PunctuatorImpl struct {
// contains filtered or unexported fields
}
PunctuatorImpl implements punctuator service
func NewPunctuatorImpl ¶
func NewPunctuatorImpl(d DataProvider, tfWrap TFWrap) (*PunctuatorImpl, error)
NewPunctuatorImpl creates instance
type ServiceData ¶
type ServiceData struct { Port int // contains filtered or unexported fields }
ServiceData keeps data required for service work
type SettingsDataProviderImpl ¶
type SettingsDataProviderImpl struct {
// contains filtered or unexported fields
}
SettingsDataProviderImpl provides punctuator data from settings
func NewSettingsDataProviderImpl ¶
func NewSettingsDataProviderImpl(dir string) (*SettingsDataProviderImpl, error)
NewSettingsDataProviderImpl inits SettingsDataProviderImpl from directory
Source Files ¶
Click to show internal directories.
Click to hide internal directories.