lib/linnaeus/persistence.rb
# Get a list of words with their number of occurrences.
# 
# == Parameters
# category::
#   A string representing a category.
# 
# wordlist::
#   A list of words for which to fetch scores.
#
# == Returns
# A hash with the word counts for the requested words
Get a list of words with their number of occurrences.
Parameters
category::
A string representing a category.

:
A list of words for which to fetch scores.

Returns
A hash with the word counts for the requested words
Get a list of words with their number of occurrences . Parameters category :: A string representing a category . : A list of words for which to fetch scores . Returns A hash with the word counts for the requested words
def fetch_scores_for_words(category, wordlist)
    Hash[wordlist.zip(@redis.pipelined do
      wordlist.each do |word|
        @redis.hget base_category_key + category, word
      end
    end)]
  end
def fetch_scores_for_words ( category , wordlist ) Hash [ wordlist . zip ( @redis . pipelined do wordlist . each do | word | @redis . hget base_category_key + category , word end end ) ] end
Get a list of words with their number of occurrences.
Get a list of words with their number of occurrences .
category
<not_specific>
wordlist
<not_specific>