classify

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeLessThanMinute      = 39
	TimeLessThanFiveMinutes = 36
	TimeLessThanHour        = 33
	TimeLessThanSixHours    = 30
	TimeLessThanTwelveHours = 27
	TimeLessThanDay         = 24
	TimeLessThanTwoDays     = 21
	TimeLessThanWeek        = 18
	TimeLessThanTwoWeeks    = 15
	TimeLessThanMonth       = 12
	TimeLessThanTwoMonths   = 9
	TimeLessThanSixMonths   = 6
	TimeLessThanYear        = 3
	TimeOlderThanAYear      = 0
	StrEquals               = 50
	StrStartsWith           = 40
	StrEndsWith             = 30
	StrContains             = 20
	StrSimilar              = 10
	NoMatch                 = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Rating

type Rating struct {
	TimePoints       uint
	SimilarityPoints uint
}

Rating of a search query

func NewRating

func NewRating(s, p string, a ...time.Time) (*Rating, error)

NewRating rates search-term s for path p within time-slice a.

func (*Rating) Points

func (r *Rating) Points() uint

Points return the point sum of a rateing. If no similarity is found, time points are ignored.

Jump to

Keyboard shortcuts

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