retrieval

package module
v0.0.0-...-dd76d50 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildWiki

func BuildWiki(dir string) error

BuildWiki produces the on-disk files that NewWiki requires from a raw dump directory.

Types

type Erdos

type Erdos struct {
	// contains filtered or unexported fields
}

func NewErdos

func NewErdos(dir string, maxMatches int) (*Erdos, error)

func (*Erdos) List

func (e *Erdos) List() ErdosListResult

func (*Erdos) Search

func (e *Erdos) Search(query string) ErdosSearchResult

type ErdosFormal

type ErdosFormal struct {
	State      string `yaml:"state" json:"state"`
	LastUpdate string `yaml:"last_update" json:"last_update"`
}

type ErdosListResult

type ErdosListResult struct {
	Results  int            `json:"results"`
	Problems []ErdosProblem `json:"problems"`
}

type ErdosMatch

type ErdosMatch struct {
	ErdosProblem
	Score float64 `json:"score"`
}

type ErdosProblem

type ErdosProblem struct {
	Number  string      `yaml:"number" json:"number"`
	Prize   string      `yaml:"prize" json:"prize"`
	Status  ErdosStatus `yaml:"status" json:"status"`
	OEIS    []string    `yaml:"oeis" json:"oeis"`
	Tags    []string    `yaml:"tags" json:"tags"`
	Comment string      `yaml:"comments" json:"comments,omitempty"`
	Formal  ErdosFormal `yaml:"formalized" json:"formalized"`
}

type ErdosSearchResult

type ErdosSearchResult struct {
	Query     string       `json:"query"`
	Results   int          `json:"results"`
	Truncated bool         `json:"truncated"`
	Matches   []ErdosMatch `json:"matches"`
}

type ErdosStatus

type ErdosStatus struct {
	State      string `yaml:"state" json:"state"`
	LastUpdate string `yaml:"last_update" json:"last_update"`
	Note       string `yaml:"note,omitempty" json:"note,omitempty"`
}

type Oeis

type Oeis struct {
	// contains filtered or unexported fields
}

func NewOeis

func NewOeis(dir string, searchCap int) (*Oeis, error)

func (*Oeis) Match

func (o *Oeis) Match(query string) []OeisMatch

func (*Oeis) Search

func (o *Oeis) Search(query string) OeisSearchResult

func (*Oeis) Show

func (o *Oeis) Show(id string) (OeisEntry, error)

type OeisEntry

type OeisEntry struct {
	ID       string   `json:"id"`
	Name     string   `json:"name"`
	Terms    string   `json:"terms"`
	Comments []string `json:"comments,omitempty"`
	Formulas []string `json:"formulas,omitempty"`
	Xrefs    []string `json:"xrefs,omitempty"`
	Keywords string   `json:"keywords,omitempty"`
	Programs []string `json:"programs,omitempty"`
}

type OeisMatch

type OeisMatch struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Terms string `json:"terms"`
}

type OeisSearchMatch

type OeisSearchMatch struct {
	ID    string  `json:"id"`
	Name  string  `json:"name"`
	Score float64 `json:"score"`
}

type OeisSearchResult

type OeisSearchResult struct {
	Query     string            `json:"query"`
	Results   int               `json:"results"`
	Truncated bool              `json:"truncated"`
	Matches   []OeisSearchMatch `json:"matches"`
}

type Wiki

type Wiki struct {
	// contains filtered or unexported fields
}

func NewWiki

func NewWiki(dir string, maxResults int) (*Wiki, error)

func (*Wiki) Article

func (w *Wiki) Article(title string) (string, error)
func (w *Wiki) Links(title string) (WikiLinksResult, error)

func (*Wiki) Lookup

func (w *Wiki) Lookup(title string) (int64, bool)

func (*Wiki) Search

func (w *Wiki) Search(query string) WikiSearchResult

type WikiLinksResult

type WikiLinksResult struct {
	Title string   `json:"title"`
	Links []string `json:"links"`
}

type WikiSearchMatch

type WikiSearchMatch struct {
	Title string  `json:"title"`
	Score float64 `json:"score"`
}

type WikiSearchResult

type WikiSearchResult struct {
	Query     string            `json:"query"`
	Results   int               `json:"results"`
	Truncated bool              `json:"truncated"`
	Matches   []WikiSearchMatch `json:"matches"`
}

Jump to

Keyboard shortcuts

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