v1

package
v0.0.0-...-67e2655 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNgramServiceServer

func RegisterNgramServiceServer(s *grpc.Server, srv NgramServiceServer)

Types

type GenerateRequest

type GenerateRequest struct {
	// limit is the target length of the output in tokens.
	Limit                int64    `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenerateRequest) Descriptor

func (*GenerateRequest) Descriptor() ([]byte, []int)

func (*GenerateRequest) GetLimit

func (m *GenerateRequest) GetLimit() int64

func (*GenerateRequest) ProtoMessage

func (*GenerateRequest) ProtoMessage()

func (*GenerateRequest) Reset

func (m *GenerateRequest) Reset()

func (*GenerateRequest) String

func (m *GenerateRequest) String() string

func (*GenerateRequest) XXX_DiscardUnknown

func (m *GenerateRequest) XXX_DiscardUnknown()

func (*GenerateRequest) XXX_Marshal

func (m *GenerateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateRequest) XXX_Merge

func (m *GenerateRequest) XXX_Merge(src proto.Message)

func (*GenerateRequest) XXX_Size

func (m *GenerateRequest) XXX_Size() int

func (*GenerateRequest) XXX_Unmarshal

func (m *GenerateRequest) XXX_Unmarshal(b []byte) error

type GenerateResponse

type GenerateResponse struct {
	// body is the output that was generated.
	Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// limit is the target length of tokens that was used (==GenerateRequest.tokens)
	Limit                int64    `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenerateResponse) Descriptor

func (*GenerateResponse) Descriptor() ([]byte, []int)

func (*GenerateResponse) GetBody

func (m *GenerateResponse) GetBody() string

func (*GenerateResponse) GetLimit

func (m *GenerateResponse) GetLimit() int64

func (*GenerateResponse) ProtoMessage

func (*GenerateResponse) ProtoMessage()

func (*GenerateResponse) Reset

func (m *GenerateResponse) Reset()

func (*GenerateResponse) String

func (m *GenerateResponse) String() string

func (*GenerateResponse) XXX_DiscardUnknown

func (m *GenerateResponse) XXX_DiscardUnknown()

func (*GenerateResponse) XXX_Marshal

func (m *GenerateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateResponse) XXX_Merge

func (m *GenerateResponse) XXX_Merge(src proto.Message)

func (*GenerateResponse) XXX_Size

func (m *GenerateResponse) XXX_Size() int

func (*GenerateResponse) XXX_Unmarshal

func (m *GenerateResponse) XXX_Unmarshal(b []byte) error

type LearnRequest

type LearnRequest struct {
	// body is the body of data being learned.
	Body                 string   `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LearnRequest) Descriptor

func (*LearnRequest) Descriptor() ([]byte, []int)

func (*LearnRequest) GetBody

func (m *LearnRequest) GetBody() string

func (*LearnRequest) ProtoMessage

func (*LearnRequest) ProtoMessage()

func (*LearnRequest) Reset

func (m *LearnRequest) Reset()

func (*LearnRequest) String

func (m *LearnRequest) String() string

func (*LearnRequest) XXX_DiscardUnknown

func (m *LearnRequest) XXX_DiscardUnknown()

func (*LearnRequest) XXX_Marshal

func (m *LearnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LearnRequest) XXX_Merge

func (m *LearnRequest) XXX_Merge(src proto.Message)

func (*LearnRequest) XXX_Size

func (m *LearnRequest) XXX_Size() int

func (*LearnRequest) XXX_Unmarshal

func (m *LearnRequest) XXX_Unmarshal(b []byte) error

type LearnResponse

type LearnResponse struct {
	// parsed_tokens is the number of tokens parsed in the training.
	ParsedTokens         int64    `protobuf:"varint,1,opt,name=parsed_tokens,json=parsedTokens,proto3" json:"parsed_tokens,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LearnResponse) Descriptor

func (*LearnResponse) Descriptor() ([]byte, []int)

func (*LearnResponse) GetParsedTokens

func (m *LearnResponse) GetParsedTokens() int64

func (*LearnResponse) ProtoMessage

func (*LearnResponse) ProtoMessage()

func (*LearnResponse) Reset

func (m *LearnResponse) Reset()

func (*LearnResponse) String

func (m *LearnResponse) String() string

func (*LearnResponse) XXX_DiscardUnknown

func (m *LearnResponse) XXX_DiscardUnknown()

func (*LearnResponse) XXX_Marshal

func (m *LearnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LearnResponse) XXX_Merge

func (m *LearnResponse) XXX_Merge(src proto.Message)

func (*LearnResponse) XXX_Size

func (m *LearnResponse) XXX_Size() int

func (*LearnResponse) XXX_Unmarshal

func (m *LearnResponse) XXX_Unmarshal(b []byte) error

type NgramServiceClient

type NgramServiceClient interface {
	// Learn trains the ngram index on a corpus of text.
	Learn(ctx context.Context, in *LearnRequest, opts ...grpc.CallOption) (*LearnResponse, error)
	// Generate outputs a random string in the trained style.
	Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error)
}

NgramServiceClient is the client API for NgramService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNgramServiceClient

func NewNgramServiceClient(cc *grpc.ClientConn) NgramServiceClient

type NgramServiceServer

type NgramServiceServer interface {
	// Learn trains the ngram index on a corpus of text.
	Learn(context.Context, *LearnRequest) (*LearnResponse, error)
	// Generate outputs a random string in the trained style.
	Generate(context.Context, *GenerateRequest) (*GenerateResponse, error)
}

NgramServiceServer is the server API for NgramService service.

type UnimplementedNgramServiceServer

type UnimplementedNgramServiceServer struct {
}

UnimplementedNgramServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedNgramServiceServer) Generate

func (*UnimplementedNgramServiceServer) Learn

Jump to

Keyboard shortcuts

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