grpcapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpcapi_sequencelabeler_proto protoreflect.FileDescriptor

Functions

func RegisterSequenceLabelerServer

func RegisterSequenceLabelerServer(s *grpc.Server, srv SequenceLabelerServer)

Types

type AnalyzeReply

type AnalyzeReply struct {
	Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// Took is the number of milliseconds it took the server to execute the request.
	Took int64 `protobuf:"varint,2,opt,name=took,proto3" json:"took,omitempty"`
	// contains filtered or unexported fields
}

func (*AnalyzeReply) Descriptor deprecated

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

Deprecated: Use AnalyzeReply.ProtoReflect.Descriptor instead.

func (*AnalyzeReply) GetTokens

func (x *AnalyzeReply) GetTokens() []*Token

func (*AnalyzeReply) GetTook

func (x *AnalyzeReply) GetTook() int64

func (*AnalyzeReply) ProtoMessage

func (*AnalyzeReply) ProtoMessage()

func (*AnalyzeReply) ProtoReflect

func (x *AnalyzeReply) ProtoReflect() protoreflect.Message

func (*AnalyzeReply) Reset

func (x *AnalyzeReply) Reset()

func (*AnalyzeReply) String

func (x *AnalyzeReply) String() string

type AnalyzeRequest

type AnalyzeRequest struct {
	Text              string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	MergeEntities     bool   `protobuf:"varint,2,opt,name=mergeEntities,proto3" json:"mergeEntities,omitempty"`
	FilterNotEntities bool   `protobuf:"varint,3,opt,name=filterNotEntities,proto3" json:"filterNotEntities,omitempty"`
	// Took is the number of milliseconds it took the server to execute the request.
	Took int64 `protobuf:"varint,4,opt,name=took,proto3" json:"took,omitempty"`
	// contains filtered or unexported fields
}

The analyze request message containing the tokens for the sequence labeler analysis.

func (*AnalyzeRequest) Descriptor deprecated

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

Deprecated: Use AnalyzeRequest.ProtoReflect.Descriptor instead.

func (*AnalyzeRequest) GetFilterNotEntities

func (x *AnalyzeRequest) GetFilterNotEntities() bool

func (*AnalyzeRequest) GetMergeEntities

func (x *AnalyzeRequest) GetMergeEntities() bool

func (*AnalyzeRequest) GetText

func (x *AnalyzeRequest) GetText() string

func (*AnalyzeRequest) GetTook

func (x *AnalyzeRequest) GetTook() int64

func (*AnalyzeRequest) ProtoMessage

func (*AnalyzeRequest) ProtoMessage()

func (*AnalyzeRequest) ProtoReflect

func (x *AnalyzeRequest) ProtoReflect() protoreflect.Message

func (*AnalyzeRequest) Reset

func (x *AnalyzeRequest) Reset()

func (*AnalyzeRequest) String

func (x *AnalyzeRequest) String() string

type SequenceLabelerClient

type SequenceLabelerClient interface {
	// Sends a request to /analyze.
	Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeReply, error)
}

SequenceLabelerClient is the client API for SequenceLabeler service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type SequenceLabelerServer

type SequenceLabelerServer interface {
	// Sends a request to /analyze.
	Analyze(context.Context, *AnalyzeRequest) (*AnalyzeReply, error)
	// contains filtered or unexported methods
}

SequenceLabelerServer is the server API for SequenceLabeler service. All implementations must embed UnimplementedSequenceLabelerServer for forward compatibility

type Token

type Token struct {
	Text  string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	Start int32  `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"`
	End   int32  `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`
	Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

The analyze response message containing the text to analyze with options.

func (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetEnd

func (x *Token) GetEnd() int32

func (*Token) GetLabel

func (x *Token) GetLabel() string

func (*Token) GetStart

func (x *Token) GetStart() int32

func (*Token) GetText

func (x *Token) GetText() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type UnimplementedSequenceLabelerServer

type UnimplementedSequenceLabelerServer struct {
}

UnimplementedSequenceLabelerServer must be embedded to have forward compatible implementations.

func (*UnimplementedSequenceLabelerServer) Analyze

Jump to

Keyboard shortcuts

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