Documentation
¶
Index ¶
- type Character
- type Member
- type Repost
- type RepostAuthor
- type Stats
- func (s *Stats) Analyze()
- func (s *Stats) AverageMessageLength() int
- func (s *Stats) Blacklist(userID string)
- func (s *Stats) Blacklisted(userID string) bool
- func (s *Stats) MostCharismatic(limit int) []*Member
- func (s *Stats) MostVisionary(limit int) []*Member
- func (s *Stats) SprintAverageMessageLength() string
- func (s *Stats) SprintMostCharismatic(limit int) string
- func (s *Stats) SprintMostVisionary(limit int) string
- func (s *Stats) SprintTextFrequencyAnalysis(limit int) string
- func (s *Stats) SprintTopCharacters(limit int) string
- func (s *Stats) SprintTopLurker(limit int) string
- func (s *Stats) SprintTopMessages(limit int) string
- func (s *Stats) SprintTopOfTheNarcissists(limit int) string
- func (s *Stats) SprintTopOfThePops(limit int) string
- func (s *Stats) SprintTopOfTheSimps(limit int) string
- func (s *Stats) SprintTopPoster(limit int) string
- func (s *Stats) SprintTopRambler(limit int) string
- func (s *Stats) SprintTopReposters(limit int, text string) string
- func (s *Stats) SprintTopReposts(limit int) string
- func (s *Stats) SprintTopWords(limit int) string
- func (s *Stats) SprintTotalMessages() string
- func (s *Stats) TopCharacters(limit int) []*Character
- func (s *Stats) TopLurker(limit int) []*Member
- func (s *Stats) TopMessages(limit int) []*groupme.Message
- func (s *Stats) TopOfTheNarcissists(limit int) []*Member
- func (s *Stats) TopOfThePops(limit int) []*Member
- func (s *Stats) TopOfTheSimps(limit int) []*Member
- func (s *Stats) TopPosters(limit int) []*Member
- func (s *Stats) TopRambler(limit int) []*Member
- func (s *Stats) TopReposts(limit int) []*Repost
- func (s *Stats) TopWords(limit int) []*Word
- func (s *Stats) TotalMessages() int
- type Word
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Member ¶
type Member struct { ID string Name string PopularityScore int // how often did others favorite their messages UnpopularityScore int // how often did their messages get zero favorites SimpScore int // how many times did they favorite someone else NarcissistScore int // how many times did they favorite themselves VisionaryScore int // how many images did they send NumMessages int // how many messages did they send }
Member is a container for a GroupMe member's staistics.
type Repost ¶
type Repost struct { Messages []*groupme.Message AuthorFrequency map[string]int // UserID -> frequency OriginalAuthor string // UserID of the first author of the message OriginalCreatedAt int // timestamp of the first message (integer seconds since the UNIX epoch) }
Repost is a counter of message duplicates.
func (*Repost) TopReposters ¶
func (r *Repost) TopReposters(limit int) []*RepostAuthor
TopReposters returns a sorted list of who reposted this message the most.
type RepostAuthor ¶
RepostAuthor is a counter of authors of a repost.
type Stats ¶
type Stats struct { Messages []*groupme.Message // GroupMe Messages to analyze Members map[string]*Member // UserID -> *Member WordFrequency map[string]*Word // text -> *Word CharacterFrequency map[rune]*Character // rune -> *Character Reposts map[string]*Repost // text -> *Repost TotalMessagesLength int // the length of all messages combined together BlacklistedUserIDs map[string]struct{} // UserIDs to ignore while analyzing messages; UserID -> nil }
Stats contains a GroupMe group's statistics.
func (*Stats) AverageMessageLength ¶
AverageMessageLength returns the average message length.
func (*Stats) Blacklist ¶
Blacklist blacklists a UserID such that it is ignored while analyzing messages.
func (*Stats) Blacklisted ¶
Blacklisted returns whether the given UserID is blacklisted from being analyzed.
func (*Stats) MostCharismatic ¶
MostCharismatic returns a sorted list of who posts the highest quality messages. Charisma is defined as (# of favorites received / # of messages they posted).
func (*Stats) MostVisionary ¶ added in v0.6.0
MostVisionary returns a sorted list of who posted the most images.
func (*Stats) SprintAverageMessageLength ¶
SprintAverageMessageLength formats an Average Message Length Bot post and returns the resulting string.
func (*Stats) SprintMostCharismatic ¶
SprintMostCharismatic formats a Most Charismatic Bot post and returns the resulting string.
func (*Stats) SprintMostVisionary ¶ added in v0.6.0
SprintMostVisionary formats a Most Visionary Bot post and returns the resulting string.
func (*Stats) SprintTextFrequencyAnalysis ¶
SprintTextFrequencyAnalysis formats a Text Frequency Analysis Bot post and returns the resulting string.
func (*Stats) SprintTopCharacters ¶
SprintTopCharacters formats a Top Characters Bot post and returns the resulting string.
func (*Stats) SprintTopLurker ¶
SprintTopLurker formats a Top Lurker Bot post and returns the resulting string.
func (*Stats) SprintTopMessages ¶
SprintTopMessages formats a Top Messages Bot post and returns the resulting string.
func (*Stats) SprintTopOfTheNarcissists ¶
SprintTopOfTheNarcissists formats a Top of the Narcissists Bot post and returns the resulting string.
func (*Stats) SprintTopOfThePops ¶
SprintTopOfThePops formats a Top of the Pops Bot post and returns the resulting string.
func (*Stats) SprintTopOfTheSimps ¶
SprintTopOfTheSimps formats a Top of the Simps Bot post and returns the resulting string.
func (*Stats) SprintTopPoster ¶
SprintTopPoster formats a Top Poster Bot post and returns the resulting string.
func (*Stats) SprintTopRambler ¶
SprintTopRambler formats a Top Rambler Bot post and returns the resulting string.
func (*Stats) SprintTopReposters ¶
SprintTopReposters formats a Top Reposters Bot post and returns the resulting string.
func (*Stats) SprintTopReposts ¶
SprintTopReposts formats a Top Reposts Bot post and returns the resulting string.
func (*Stats) SprintTopWords ¶
SprintTopWords formats a Top Words Bot post and returns the resulting string.
func (*Stats) SprintTotalMessages ¶
SprintTotalMessages formats an Total Messages Bot post and returns the resulting string.
func (*Stats) TopCharacters ¶
TopCharacters returns a sorted list of the most frequently used characters.
func (*Stats) TopLurker ¶
TopLurker returns a sorted list of who lurks the most. A lurker is defined as (# of favorites given out / # of messages they posted).
func (*Stats) TopMessages ¶
TopMessages returns a sorted list of the most favorited messages.
func (*Stats) TopOfTheNarcissists ¶
TopOfTheNarcissists returns a sorted list of the biggest narcissistic members. A narcissist is defined as someone who favorites their own messages the most.
func (*Stats) TopOfThePops ¶
TopOfThePops returns a sorted list of the most popular members. Popularity is defined as someone who has the most favorites.
func (*Stats) TopOfTheSimps ¶
TopOfTheSimps returns a sorted list of the biggest simp members. A simp is defined as someone who favorites other members' messages the most.
func (*Stats) TopPosters ¶
TopPosters returns a sorted list of who posted the most messages.
func (*Stats) TopRambler ¶
TopRambler returns a sorted list of who has the most messages with zero favorites.
func (*Stats) TopReposts ¶
TopReposts returns a sorted list of the most duplicated messages.
func (*Stats) TotalMessages ¶
TotalMessages returns the total number of messages.