Documentation
¶
Overview ¶
Package analyze provides analysis of the news Items.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeltaList ¶ added in v0.6.0
type DeltaList []Delta
DeltaList is a list of Delta, analogous to the WordList
type Period ¶
Period represents a timespan.
func NewPeriod ¶
NewPeriod creates a new Period, beginning at the specified Time, ending after the specified Duration.
type TrendScout ¶
type TrendScout struct {
// contains filtered or unexported fields
}
TrendScout looks for the most frequent words in a given period, and how the distribution changed compared to earlier periods.
func NewTrendScout ¶
func NewTrendScout(pool *database.Pool) (*TrendScout, error)
NewTrendScout creates a new TrendScout
func (*TrendScout) AnalyzeDelta ¶ added in v0.6.0
func (ts *TrendScout) AnalyzeDelta(p1, p2 *Period, cnt int) (DeltaList, error)
AnalyzeDelta calculates the changes in word frequencies between two Periods.
func (*TrendScout) AnalyzePeriod ¶
func (ts *TrendScout) AnalyzePeriod(p *Period, cnt int) (WordList, error)
AnalyzePeriod calculates the frequencies of words in a given Period.
func (*TrendScout) ComputeSeries ¶ added in v0.7.0
ComputeSeries computes a series of frequencies.
type Word ¶
Word is a word (duh!) and the number of times it occured in a given period. Sorry about the name.