Documentation ¶
Index ¶
- Variables
- func RegisterMorphologyServiceServer(s *grpc.Server, srv MorphologyServiceServer)
- type DictionaryItemProto
- func (*DictionaryItemProto) Descriptor() ([]byte, []int)deprecated
- func (x *DictionaryItemProto) GetLemma() string
- func (x *DictionaryItemProto) GetPrimaryPos() string
- func (x *DictionaryItemProto) GetSecondaryPos() string
- func (*DictionaryItemProto) ProtoMessage()
- func (x *DictionaryItemProto) ProtoReflect() protoreflect.Message
- func (x *DictionaryItemProto) Reset()
- func (x *DictionaryItemProto) String() string
- type MorphemeDataProto
- func (*MorphemeDataProto) Descriptor() ([]byte, []int)deprecated
- func (x *MorphemeDataProto) GetMorpheme() string
- func (x *MorphemeDataProto) GetSurface() string
- func (*MorphemeDataProto) ProtoMessage()
- func (x *MorphemeDataProto) ProtoReflect() protoreflect.Message
- func (x *MorphemeDataProto) Reset()
- func (x *MorphemeDataProto) String() string
- type MorphologyServiceClient
- type MorphologyServiceServer
- type SentenceAnalysisProto
- func (*SentenceAnalysisProto) Descriptor() ([]byte, []int)deprecated
- func (x *SentenceAnalysisProto) GetInput() string
- func (x *SentenceAnalysisProto) GetResults() []*SentenceWordAnalysisProto
- func (*SentenceAnalysisProto) ProtoMessage()
- func (x *SentenceAnalysisProto) ProtoReflect() protoreflect.Message
- func (x *SentenceAnalysisProto) Reset()
- func (x *SentenceAnalysisProto) String() string
- type SentenceAnalysisRequest
- func (*SentenceAnalysisRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SentenceAnalysisRequest) GetContainAllAnalyses() bool
- func (x *SentenceAnalysisRequest) GetInput() string
- func (*SentenceAnalysisRequest) ProtoMessage()
- func (x *SentenceAnalysisRequest) ProtoReflect() protoreflect.Message
- func (x *SentenceAnalysisRequest) Reset()
- func (x *SentenceAnalysisRequest) String() string
- type SentenceWordAnalysisProto
- func (*SentenceWordAnalysisProto) Descriptor() ([]byte, []int)deprecated
- func (x *SentenceWordAnalysisProto) GetAll() *WordAnalysisProto
- func (x *SentenceWordAnalysisProto) GetBest() *SingleAnalysisProto
- func (x *SentenceWordAnalysisProto) GetToken() string
- func (*SentenceWordAnalysisProto) ProtoMessage()
- func (x *SentenceWordAnalysisProto) ProtoReflect() protoreflect.Message
- func (x *SentenceWordAnalysisProto) Reset()
- func (x *SentenceWordAnalysisProto) String() string
- type SingleAnalysisProto
- func (*SingleAnalysisProto) Descriptor() ([]byte, []int)deprecated
- func (x *SingleAnalysisProto) GetAnalysis() string
- func (x *SingleAnalysisProto) GetDictionaryItem() *DictionaryItemProto
- func (x *SingleAnalysisProto) GetInformal() bool
- func (x *SingleAnalysisProto) GetLemmas() []string
- func (x *SingleAnalysisProto) GetMorphemes() []*MorphemeDataProto
- func (x *SingleAnalysisProto) GetPos() string
- func (x *SingleAnalysisProto) GetRuntime() bool
- func (*SingleAnalysisProto) ProtoMessage()
- func (x *SingleAnalysisProto) ProtoReflect() protoreflect.Message
- func (x *SingleAnalysisProto) Reset()
- func (x *SingleAnalysisProto) String() string
- type UnimplementedMorphologyServiceServer
- type WordAnalysisProto
- func (*WordAnalysisProto) Descriptor() ([]byte, []int)deprecated
- func (x *WordAnalysisProto) GetAnalyses() []*SingleAnalysisProto
- func (x *WordAnalysisProto) GetInput() string
- func (*WordAnalysisProto) ProtoMessage()
- func (x *WordAnalysisProto) ProtoReflect() protoreflect.Message
- func (x *WordAnalysisProto) Reset()
- func (x *WordAnalysisProto) String() string
- type WordAnalysisRequest
- func (*WordAnalysisRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WordAnalysisRequest) GetInput() string
- func (*WordAnalysisRequest) ProtoMessage()
- func (x *WordAnalysisRequest) ProtoReflect() protoreflect.Message
- func (x *WordAnalysisRequest) Reset()
- func (x *WordAnalysisRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var File_morphology_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMorphologyServiceServer ¶
func RegisterMorphologyServiceServer(s *grpc.Server, srv MorphologyServiceServer)
Types ¶
type DictionaryItemProto ¶
type DictionaryItemProto struct { Lemma string `protobuf:"bytes,1,opt,name=lemma,proto3" json:"lemma,omitempty"` PrimaryPos string `protobuf:"bytes,2,opt,name=primaryPos,proto3" json:"primaryPos,omitempty"` SecondaryPos string `protobuf:"bytes,3,opt,name=secondaryPos,proto3" json:"secondaryPos,omitempty"` // contains filtered or unexported fields }
A dictionary item. Lemma and pos values are provided. TODO: POS values should be enums.
func (*DictionaryItemProto) Descriptor
deprecated
func (*DictionaryItemProto) Descriptor() ([]byte, []int)
Deprecated: Use DictionaryItemProto.ProtoReflect.Descriptor instead.
func (*DictionaryItemProto) GetLemma ¶
func (x *DictionaryItemProto) GetLemma() string
func (*DictionaryItemProto) GetPrimaryPos ¶
func (x *DictionaryItemProto) GetPrimaryPos() string
func (*DictionaryItemProto) GetSecondaryPos ¶
func (x *DictionaryItemProto) GetSecondaryPos() string
func (*DictionaryItemProto) ProtoMessage ¶
func (*DictionaryItemProto) ProtoMessage()
func (*DictionaryItemProto) ProtoReflect ¶
func (x *DictionaryItemProto) ProtoReflect() protoreflect.Message
func (*DictionaryItemProto) Reset ¶
func (x *DictionaryItemProto) Reset()
func (*DictionaryItemProto) String ¶
func (x *DictionaryItemProto) String() string
type MorphemeDataProto ¶
type MorphemeDataProto struct { Surface string `protobuf:"bytes,1,opt,name=surface,proto3" json:"surface,omitempty"` Morpheme string `protobuf:"bytes,2,opt,name=morpheme,proto3" json:"morpheme,omitempty"` // contains filtered or unexported fields }
Contains surface form and id of the morpheme. Like surface = "acak", morpheme = Fut
func (*MorphemeDataProto) Descriptor
deprecated
func (*MorphemeDataProto) Descriptor() ([]byte, []int)
Deprecated: Use MorphemeDataProto.ProtoReflect.Descriptor instead.
func (*MorphemeDataProto) GetMorpheme ¶
func (x *MorphemeDataProto) GetMorpheme() string
func (*MorphemeDataProto) GetSurface ¶
func (x *MorphemeDataProto) GetSurface() string
func (*MorphemeDataProto) ProtoMessage ¶
func (*MorphemeDataProto) ProtoMessage()
func (*MorphemeDataProto) ProtoReflect ¶
func (x *MorphemeDataProto) ProtoReflect() protoreflect.Message
func (*MorphemeDataProto) Reset ¶
func (x *MorphemeDataProto) Reset()
func (*MorphemeDataProto) String ¶
func (x *MorphemeDataProto) String() string
type MorphologyServiceClient ¶
type MorphologyServiceClient interface { AnalyzeSentence(ctx context.Context, in *SentenceAnalysisRequest, opts ...grpc.CallOption) (*SentenceAnalysisProto, error) AnalyzeWord(ctx context.Context, in *WordAnalysisRequest, opts ...grpc.CallOption) (*WordAnalysisProto, error) }
MorphologyServiceClient is the client API for MorphologyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMorphologyServiceClient ¶
func NewMorphologyServiceClient(cc grpc.ClientConnInterface) MorphologyServiceClient
type MorphologyServiceServer ¶
type MorphologyServiceServer interface { AnalyzeSentence(context.Context, *SentenceAnalysisRequest) (*SentenceAnalysisProto, error) AnalyzeWord(context.Context, *WordAnalysisRequest) (*WordAnalysisProto, error) }
MorphologyServiceServer is the server API for MorphologyService service.
type SentenceAnalysisProto ¶
type SentenceAnalysisProto struct { // input sentence Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // for each token, result best morphological analysis and if requested, all // analyses. Results []*SentenceWordAnalysisProto `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*SentenceAnalysisProto) Descriptor
deprecated
func (*SentenceAnalysisProto) Descriptor() ([]byte, []int)
Deprecated: Use SentenceAnalysisProto.ProtoReflect.Descriptor instead.
func (*SentenceAnalysisProto) GetInput ¶
func (x *SentenceAnalysisProto) GetInput() string
func (*SentenceAnalysisProto) GetResults ¶
func (x *SentenceAnalysisProto) GetResults() []*SentenceWordAnalysisProto
func (*SentenceAnalysisProto) ProtoMessage ¶
func (*SentenceAnalysisProto) ProtoMessage()
func (*SentenceAnalysisProto) ProtoReflect ¶
func (x *SentenceAnalysisProto) ProtoReflect() protoreflect.Message
func (*SentenceAnalysisProto) Reset ¶
func (x *SentenceAnalysisProto) Reset()
func (*SentenceAnalysisProto) String ¶
func (x *SentenceAnalysisProto) String() string
type SentenceAnalysisRequest ¶
type SentenceAnalysisRequest struct { // sentence string Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // if [true], all analyses of all tokens will be included in the response // else, only the best analysis will be used. ContainAllAnalyses bool `protobuf:"varint,2,opt,name=containAllAnalyses,proto3" json:"containAllAnalyses,omitempty"` // contains filtered or unexported fields }
Sentence analysis request.
func (*SentenceAnalysisRequest) Descriptor
deprecated
func (*SentenceAnalysisRequest) Descriptor() ([]byte, []int)
Deprecated: Use SentenceAnalysisRequest.ProtoReflect.Descriptor instead.
func (*SentenceAnalysisRequest) GetContainAllAnalyses ¶
func (x *SentenceAnalysisRequest) GetContainAllAnalyses() bool
func (*SentenceAnalysisRequest) GetInput ¶
func (x *SentenceAnalysisRequest) GetInput() string
func (*SentenceAnalysisRequest) ProtoMessage ¶
func (*SentenceAnalysisRequest) ProtoMessage()
func (*SentenceAnalysisRequest) ProtoReflect ¶
func (x *SentenceAnalysisRequest) ProtoReflect() protoreflect.Message
func (*SentenceAnalysisRequest) Reset ¶
func (x *SentenceAnalysisRequest) Reset()
func (*SentenceAnalysisRequest) String ¶
func (x *SentenceAnalysisRequest) String() string
type SentenceWordAnalysisProto ¶
type SentenceWordAnalysisProto struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Best *SingleAnalysisProto `protobuf:"bytes,2,opt,name=best,proto3" json:"best,omitempty"` All *WordAnalysisProto `protobuf:"bytes,3,opt,name=all,proto3" json:"all,omitempty"` // contains filtered or unexported fields }
After disambiguation, a SentenceWordAnalysis_P object per use is used.
func (*SentenceWordAnalysisProto) Descriptor
deprecated
func (*SentenceWordAnalysisProto) Descriptor() ([]byte, []int)
Deprecated: Use SentenceWordAnalysisProto.ProtoReflect.Descriptor instead.
func (*SentenceWordAnalysisProto) GetAll ¶
func (x *SentenceWordAnalysisProto) GetAll() *WordAnalysisProto
func (*SentenceWordAnalysisProto) GetBest ¶
func (x *SentenceWordAnalysisProto) GetBest() *SingleAnalysisProto
func (*SentenceWordAnalysisProto) GetToken ¶
func (x *SentenceWordAnalysisProto) GetToken() string
func (*SentenceWordAnalysisProto) ProtoMessage ¶
func (*SentenceWordAnalysisProto) ProtoMessage()
func (*SentenceWordAnalysisProto) ProtoReflect ¶
func (x *SentenceWordAnalysisProto) ProtoReflect() protoreflect.Message
func (*SentenceWordAnalysisProto) Reset ¶
func (x *SentenceWordAnalysisProto) Reset()
func (*SentenceWordAnalysisProto) String ¶
func (x *SentenceWordAnalysisProto) String() string
type SingleAnalysisProto ¶
type SingleAnalysisProto struct { // Defines the POS of the whole word. Pos string `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos,omitempty"` // root word's dictionary information (contains lemma and pos values.) DictionaryItem *DictionaryItemProto `protobuf:"bytes,2,opt,name=dictionaryItem,proto3" json:"dictionaryItem,omitempty"` // This is the long formatted analysis string. Analysis string `protobuf:"bytes,3,opt,name=analysis,proto3" json:"analysis,omitempty"` // [true] if this analysis contain informal morphemes. Informal bool `protobuf:"varint,4,opt,name=informal,proto3" json:"informal,omitempty"` // [true] if this root form of the input does not exist in dictionary. Runtime bool `protobuf:"varint,5,opt,name=runtime,proto3" json:"runtime,omitempty"` // all lemma values. Such as for input "kapattırdım" -> ["kapat","kapattır"] Lemmas []string `protobuf:"bytes,6,rep,name=lemmas,proto3" json:"lemmas,omitempty"` // all morpheme information. Morphemes []*MorphemeDataProto `protobuf:"bytes,7,rep,name=morphemes,proto3" json:"morphemes,omitempty"` // contains filtered or unexported fields }
represents a single morphological analysis result.
func (*SingleAnalysisProto) Descriptor
deprecated
func (*SingleAnalysisProto) Descriptor() ([]byte, []int)
Deprecated: Use SingleAnalysisProto.ProtoReflect.Descriptor instead.
func (*SingleAnalysisProto) GetAnalysis ¶
func (x *SingleAnalysisProto) GetAnalysis() string
func (*SingleAnalysisProto) GetDictionaryItem ¶
func (x *SingleAnalysisProto) GetDictionaryItem() *DictionaryItemProto
func (*SingleAnalysisProto) GetInformal ¶
func (x *SingleAnalysisProto) GetInformal() bool
func (*SingleAnalysisProto) GetLemmas ¶
func (x *SingleAnalysisProto) GetLemmas() []string
func (*SingleAnalysisProto) GetMorphemes ¶
func (x *SingleAnalysisProto) GetMorphemes() []*MorphemeDataProto
func (*SingleAnalysisProto) GetPos ¶
func (x *SingleAnalysisProto) GetPos() string
func (*SingleAnalysisProto) GetRuntime ¶
func (x *SingleAnalysisProto) GetRuntime() bool
func (*SingleAnalysisProto) ProtoMessage ¶
func (*SingleAnalysisProto) ProtoMessage()
func (*SingleAnalysisProto) ProtoReflect ¶
func (x *SingleAnalysisProto) ProtoReflect() protoreflect.Message
func (*SingleAnalysisProto) Reset ¶
func (x *SingleAnalysisProto) Reset()
func (*SingleAnalysisProto) String ¶
func (x *SingleAnalysisProto) String() string
type UnimplementedMorphologyServiceServer ¶
type UnimplementedMorphologyServiceServer struct { }
UnimplementedMorphologyServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMorphologyServiceServer) AnalyzeSentence ¶
func (*UnimplementedMorphologyServiceServer) AnalyzeSentence(context.Context, *SentenceAnalysisRequest) (*SentenceAnalysisProto, error)
func (*UnimplementedMorphologyServiceServer) AnalyzeWord ¶
func (*UnimplementedMorphologyServiceServer) AnalyzeWord(context.Context, *WordAnalysisRequest) (*WordAnalysisProto, error)
type WordAnalysisProto ¶
type WordAnalysisProto struct { // input word. Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` Analyses []*SingleAnalysisProto `protobuf:"bytes,2,rep,name=analyses,proto3" json:"analyses,omitempty"` // contains filtered or unexported fields }
Contains all analyses of a word.
func (*WordAnalysisProto) Descriptor
deprecated
func (*WordAnalysisProto) Descriptor() ([]byte, []int)
Deprecated: Use WordAnalysisProto.ProtoReflect.Descriptor instead.
func (*WordAnalysisProto) GetAnalyses ¶
func (x *WordAnalysisProto) GetAnalyses() []*SingleAnalysisProto
func (*WordAnalysisProto) GetInput ¶
func (x *WordAnalysisProto) GetInput() string
func (*WordAnalysisProto) ProtoMessage ¶
func (*WordAnalysisProto) ProtoMessage()
func (*WordAnalysisProto) ProtoReflect ¶
func (x *WordAnalysisProto) ProtoReflect() protoreflect.Message
func (*WordAnalysisProto) Reset ¶
func (x *WordAnalysisProto) Reset()
func (*WordAnalysisProto) String ¶
func (x *WordAnalysisProto) String() string
type WordAnalysisRequest ¶
type WordAnalysisRequest struct { Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
Morphological analysis request for a single word.
func (*WordAnalysisRequest) Descriptor
deprecated
func (*WordAnalysisRequest) Descriptor() ([]byte, []int)
Deprecated: Use WordAnalysisRequest.ProtoReflect.Descriptor instead.
func (*WordAnalysisRequest) GetInput ¶
func (x *WordAnalysisRequest) GetInput() string
func (*WordAnalysisRequest) ProtoMessage ¶
func (*WordAnalysisRequest) ProtoMessage()
func (*WordAnalysisRequest) ProtoReflect ¶
func (x *WordAnalysisRequest) ProtoReflect() protoreflect.Message
func (*WordAnalysisRequest) Reset ¶
func (x *WordAnalysisRequest) Reset()
func (*WordAnalysisRequest) String ¶
func (x *WordAnalysisRequest) String() string