service

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(conf *recconf.RecommendConfig)

Types

type CallBackService

type CallBackService struct {
	User  *module.User
	Items []*module.Item
	// contains filtered or unexported fields
}

func NewCallBackService

func NewCallBackService() *CallBackService

func (*CallBackService) LoadFeatures

func (r *CallBackService) LoadFeatures(context *context.RecommendContext)

func (*CallBackService) LoadUserFeatures

func (r *CallBackService) LoadUserFeatures(context *context.RecommendContext)

func (*CallBackService) Rank

func (r *CallBackService) Rank(context *context.RecommendContext)

func (*CallBackService) Recommend

func (r *CallBackService) Recommend(context *context.RecommendContext)

func (*CallBackService) RecordLog

func (r *CallBackService) RecordLog(context *context.RecommendContext, msg string) error

func (*CallBackService) RecordLogList

func (r *CallBackService) RecordLogList(context *context.RecommendContext, messages []map[string]interface{}) error

func (*CallBackService) RecordToDatahub

func (r *CallBackService) RecordToDatahub(name string, msg string) error

func (*CallBackService) RecordToDatahubList

func (r *CallBackService) RecordToDatahubList(name string, messages []map[string]interface{}) error

func (*CallBackService) RecordToKafka

func (r *CallBackService) RecordToKafka(kafka_name string, msg string) error

func (*CallBackService) RecordToKafkaList

func (r *CallBackService) RecordToKafkaList(kafka_name string, messages []map[string]interface{}) error

type Category

type Category struct {
	CategoryName string
	// contains filtered or unexported fields
}

func NewCategory

func NewCategory(name string) *Category

func (*Category) GetRecallNames

func (c *Category) GetRecallNames() []string

func (*Category) GetRecalls

func (c *Category) GetRecalls() []recall.Recall

func (*Category) Init

func (c *Category) Init(config recconf.CategoryConfig)

type FeatureReplyService

type FeatureReplyService struct {
	RecommendService
}

func NewFeatureReplyService

func NewFeatureReplyService() *FeatureReplyService

func (*FeatureReplyService) FeatureReply

func (r *FeatureReplyService) FeatureReply(userFeatures string, itemFeatures, itemids []string, context *context.RecommendContext)

type RecallService

type RecallService struct {
}

func (*RecallService) GetItems

func (s *RecallService) GetItems(user *module.User, context *context.RecommendContext) (ret []*module.Item)

type RecommendService

type RecommendService struct {
}

func (*RecommendService) Filter

func (s *RecommendService) Filter(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item

func (*RecommendService) GetUID

func (s *RecommendService) GetUID(context *context.RecommendContext) module.UID

func (*RecommendService) PreSort

func (s *RecommendService) PreSort(items []*module.Item, context *context.RecommendContext) []*module.Item

func (*RecommendService) Sort

func (s *RecommendService) Sort(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item

type Scene

type Scene struct {
	SceneId    string
	Categories map[string]*Category
}

func GetSence

func GetSence(sceneId string) (*Scene, error)

func NewScene

func NewScene(senceId string) *Scene

func (*Scene) AddCategory

func (s *Scene) AddCategory(name string, category *Category)

func (*Scene) GetCategory

func (s *Scene) GetCategory(name string) (*Category, error)

func (*Scene) Init

func (s *Scene) Init(config recconf.SceneConfig)

type UserRecallService

type UserRecallService struct {
	RecommendService
	// contains filtered or unexported fields
}

func NewUserRecallService

func NewUserRecallService() *UserRecallService

func (*UserRecallService) Recommend

func (r *UserRecallService) Recommend(context *context.RecommendContext) []*module.Item

type UserRecommendService

type UserRecommendService struct {
	RecommendService
	// contains filtered or unexported fields
}

func NewUserRecommendService

func NewUserRecommendService() *UserRecommendService

func (*UserRecommendService) Recommend

func (r *UserRecommendService) Recommend(context *context.RecommendContext) []*module.Item

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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