Created
August 14, 2008 20:52
-
-
Save jessehattabaugh/5487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_analyze_terms(){ | |
printp("total:",storage.site.terms) | |
storage.terms.sort(lastAnalyzed).limit(40).forEach(function(t){ | |
t.volume = (100 / storage.site.count) * t.count | |
if(t.volume > 0.1) t.relevant = false | |
else if(t.volume < 0.008) t.relevant = false | |
else t.relevant = true | |
storage.interests.filter({term:t}).forEach(function(i){ | |
i.volume = (100 / i.user.count) * i.count | |
i.difference = i.volume - t.volume | |
if(i.volume > 0.1) i.relevant = false | |
else if(i.volume < 0.02) i.relevant = false | |
else i.relevant = true | |
i.analyzed = new Date() | |
}) | |
t.analyzed = new Date() | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment