hashtag analysis, and some updates

This commit is contained in:
arnaucode
2017-04-16 23:14:42 +02:00
parent ccfc1f6edc
commit 01099f172f
9 changed files with 78 additions and 36 deletions

17
analyzeHashtags.go Normal file
View 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)
}