mirror of
https://github.com/arnaucube/argos.git
synced 2026-02-07 19:16:40 +01:00
hashtag analysis, and some updates
This commit is contained in:
17
analyzeHashtags.go
Normal file
17
analyzeHashtags.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/dghubble/go-twitter/twitter"
|
||||
)
|
||||
|
||||
func analyzeHashtags(tweets []twitter.Tweet, words map[string]int) map[string]int {
|
||||
var hashtags = make(map[string]int)
|
||||
for v, k := range words {
|
||||
if strings.Contains(v, "#") {
|
||||
hashtags[v] = k
|
||||
}
|
||||
}
|
||||
return (hashtags)
|
||||
}
|
||||
Reference in New Issue
Block a user