Documentation
¶
Overview ¶
Package recommend computes static related-article rankings for public notes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(idx *model.VaultIndex, graph *model.LinkGraph, limit int) (map[string][]RankedNote, error)
Build computes the top-N related notes for every public note in the index.
Types ¶
type RankedNote ¶
RankedNote contains one related-note candidate and its final ranking score.
type Recommender ¶
type Recommender struct {
// contains filtered or unexported fields
}
Recommender holds the prebuilt corpus and note metadata used for ranking.
func New ¶
func New(idx *model.VaultIndex, graph *model.LinkGraph) (*Recommender, error)
New constructs a reusable recommender over the current public-note corpus.
func (*Recommender) Related ¶
func (r *Recommender) Related(note *model.Note, limit int) []RankedNote
Related ranks other public notes for a given source note.
Click to show internal directories.
Click to hide internal directories.