lookup

package
v0.0.0-...-f3d2279 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BM25RankN

func BM25RankN(query string, corpus []BM25InputItem, numHits int) ([]interface{}, error)

func Tokenize

func Tokenize(s string) ([]string, error)

Types

type BM25InputItem

type BM25InputItem interface {
	GetText() string
	GetItem() interface{}
}

type BM25Result

type BM25Result struct {
	Score      float64
	QueryTerms []string
	InputItem  BM25InputItem
}

type Commit

type Commit struct {
	AuthorName  string
	AuthorEmail string
	Hash        string
	Message     string
	CreatedAt   time.Time
	Refs        string
	RemoteURL   string
}

func (*Commit) Display

func (c *Commit) Display() string

type GHClient

type GHClient struct {
}

func (*GHClient) GetOpenIssues

func (ghc *GHClient) GetOpenIssues(owner, repo string) ([]*Issue, error)

func (*GHClient) IsAvailable

func (ghc *GHClient) IsAvailable() bool

type GitClient

type GitClient struct {
}

func (*GitClient) GetCommits

func (gc *GitClient) GetCommits(since string, author string) ([]*Commit, error)

func (*GitClient) GetCurrentRepoInfo

func (gc *GitClient) GetCurrentRepoInfo() (owner, repo string, err error)

func (*GitClient) IsInsideGitWorkTree

func (gc *GitClient) IsInsideGitWorkTree() bool

type Issue

type Issue struct {
	Number    int       `json:"number"`
	Title     string    `json:"title"`
	Body      string    `json:"body"`
	CreatedAt time.Time `json:"created_at"`
}

func (*Issue) Display

func (i *Issue) Display(issues []*Issue) string

func (*Issue) GetText

func (i *Issue) GetText() string

type RankCommitItem

type RankCommitItem struct {
	Commit *Commit
}

func (*RankCommitItem) GetItem

func (rci *RankCommitItem) GetItem() interface{}

func (*RankCommitItem) GetText

func (rci *RankCommitItem) GetText() string

type RankIssueItem

type RankIssueItem struct {
	Issue *Issue
}

func (*RankIssueItem) GetItem

func (rii *RankIssueItem) GetItem() interface{}

func (*RankIssueItem) GetText

func (rii *RankIssueItem) GetText() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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