Documentation ¶
Index ¶
- type AppInterface
- type CommandsRunner
- func (runner *CommandsRunner) Err(err error)
- func (runner *CommandsRunner) NewCmdAnalyse() *cobra.Command
- func (runner *CommandsRunner) NewCmdBrain() *cobra.Command
- func (runner *CommandsRunner) NewCmdListen(queueCreator QueueCreator) *cobra.Command
- func (runner *CommandsRunner) NewCmdTrain() *cobra.Command
- func (runner *CommandsRunner) Out(s string)
- type Prediction
- type QueueCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInterface ¶
type AppInterface interface { BrainList() ([]entity.BrainInterface, error) GetBrainByReference(reference string) (entity.BrainInterface, error) CreateBrain(name string, description string) (entity.BrainInterface, error) DeleteBrain(id int64) error Train(brainID int64, samples []entity.Sample) error // @TODO Not used, remove from here Predict(brainID int64, text string) (prediction entity.Prediction, err error) HumanizedPredict(brainID int64, text string) (prediction entity.HumanizedPrediction, err error) GetClassByID(classID int64) (entity.ClassInterface, error) }
AppInterface defines dependeny which is used to declare what CLI interface can perform
type CommandsRunner ¶
type CommandsRunner struct {
// contains filtered or unexported fields
}
CommandsRunner contains app and input-output streams
func NewCommandsRunner ¶
func NewCommandsRunner(app AppInterface, in io.Reader, out, err io.Writer) *CommandsRunner
NewCommandsRunner just a simple constructor for CommandsRunner
func (*CommandsRunner) Err ¶
func (runner *CommandsRunner) Err(err error)
Err writes string with trailing line break to the error stream
func (*CommandsRunner) NewCmdAnalyse ¶
func (runner *CommandsRunner) NewCmdAnalyse() *cobra.Command
NewCmdAnalyse returns command which allows to run command”
func (*CommandsRunner) NewCmdBrain ¶
func (runner *CommandsRunner) NewCmdBrain() *cobra.Command
func (*CommandsRunner) NewCmdListen ¶
func (runner *CommandsRunner) NewCmdListen(queueCreator QueueCreator) *cobra.Command
NewCmdListen returns command for a queue listening. @TODO This command should be completely refactored.
func (*CommandsRunner) NewCmdTrain ¶
func (runner *CommandsRunner) NewCmdTrain() *cobra.Command
NewCmdTrain returns command for brain training
func (*CommandsRunner) Out ¶
func (runner *CommandsRunner) Out(s string)
Out writes string with trailing line break to the standard output stream
type Prediction ¶
Click to show internal directories.
Click to hide internal directories.