Documentation ¶
Index ¶
- func LoadPipelineConfigs(conf *recconf.RecommendConfig)
- func Recommend(user *module.User, context *context.RecommendContext, ...) (ret []*module.Item)
- type ColdStartRankService
- type FeatureService
- type FilterService
- type GeneralRank
- type GeneralRankService
- func (r *GeneralRankService) AddGeneralRank(rankId string, rank *GeneralRank)
- func (r *GeneralRankService) Clear()
- func (r *GeneralRankService) GetGeneralRank(rankId string) (*GeneralRank, bool)
- func (r *GeneralRankService) GetGeneralRankByContext(context *context.RecommendContext) *GeneralRank
- func (r *GeneralRankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext) (ret []*module.Item)
- type PipelineService
- type RankService
- type RecallService
- type SortService
- type UserRecommendService
- func (s *UserRecommendService) Filter(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
- func (r *UserRecommendService) Recommend(user *module.User, context *context.RecommendContext, ...) []*module.Item
- func (s *UserRecommendService) Sort(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPipelineConfigs ¶
func LoadPipelineConfigs(conf *recconf.RecommendConfig)
func Recommend ¶
func Recommend(user *module.User, context *context.RecommendContext, debugService *debug.DebugService) (ret []*module.Item)
Types ¶
type ColdStartRankService ¶
type ColdStartRankService struct {
// contains filtered or unexported fields
}
func NewColdStartRankService ¶
func NewColdStartRankService(config *recconf.PipelineConfig) *ColdStartRankService
func (*ColdStartRankService) GetColdStartRankByContext ¶
func (s *ColdStartRankService) GetColdStartRankByContext(context *context.RecommendContext) *rank.ColdStartRank
func (*ColdStartRankService) Rank ¶
func (s *ColdStartRankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext)
type FeatureService ¶
type FeatureService struct {
// contains filtered or unexported fields
}
func NewFeatureService ¶
func NewFeatureService(config *recconf.PipelineConfig) *FeatureService
func (*FeatureService) GetFeatureServiceByContext ¶
func (fs *FeatureService) GetFeatureServiceByContext(context *context.RecommendContext) *feature.FeatureService
func (*FeatureService) LoadFeatures ¶
func (fs *FeatureService) LoadFeatures(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
type FilterService ¶
type FilterService struct {
// contains filtered or unexported fields
}
func NewFilterService ¶
func NewFilterService(config *recconf.PipelineConfig) *FilterService
func (*FilterService) Filter ¶
func (fs *FilterService) Filter(filterData *filter.FilterData)
type GeneralRank ¶
type GeneralRank struct {
*general_rank.BaseGeneralRank
}
func NewGeneralRankWithConfig ¶
func NewGeneralRankWithConfig(scene string, config recconf.GeneralRankConfig) (*GeneralRank, error)
type GeneralRankService ¶
type GeneralRankService struct {
// contains filtered or unexported fields
}
func NewGeneralRankService ¶
func NewGeneralRankService(config *recconf.PipelineConfig) *GeneralRankService
func (*GeneralRankService) AddGeneralRank ¶
func (r *GeneralRankService) AddGeneralRank(rankId string, rank *GeneralRank)
func (*GeneralRankService) Clear ¶
func (r *GeneralRankService) Clear()
func (*GeneralRankService) GetGeneralRank ¶
func (r *GeneralRankService) GetGeneralRank(rankId string) (*GeneralRank, bool)
func (*GeneralRankService) GetGeneralRankByContext ¶
func (r *GeneralRankService) GetGeneralRankByContext(context *context.RecommendContext) *GeneralRank
GetGeneralRank return the GeneralRank by the context If not found, return nil
type PipelineService ¶
type PipelineService struct {
// contains filtered or unexported fields
}
func NewPipelineService ¶
func NewPipelineService() *PipelineService
type RankService ¶
type RankService struct {
// contains filtered or unexported fields
}
func NewRankService ¶
func NewRankService(config *recconf.PipelineConfig) *RankService
func (*RankService) Rank ¶
func (r *RankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext)
type RecallService ¶
type RecallService struct {
// contains filtered or unexported fields
}
func NewRecallService ¶
func NewRecallService(config *recconf.PipelineConfig) *RecallService
func (*RecallService) GetItems ¶
func (s *RecallService) GetItems(user *module.User, context *context.RecommendContext) (ret []*module.Item)
type SortService ¶
type SortService struct {
// contains filtered or unexported fields
}
func NewSortService ¶
func NewSortService(config *recconf.PipelineConfig) *SortService
func (*SortService) Sort ¶
func (ss *SortService) Sort(sortData *sort.SortData)
type UserRecommendService ¶
type UserRecommendService struct {
// contains filtered or unexported fields
}
func NewUserRecommendService ¶
func NewUserRecommendService(config *recconf.PipelineConfig) *UserRecommendService
func (*UserRecommendService) Filter ¶
func (s *UserRecommendService) Filter(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item
func (*UserRecommendService) Recommend ¶
func (r *UserRecommendService) Recommend(user *module.User, context *context.RecommendContext, debugService *debug.DebugService) []*module.Item
Click to show internal directories.
Click to hide internal directories.