lib/myaso/lexicon.rb
# Perform lazy initialization of global tags.
#
Perform lazy initialization of global tags.
Perform lazy initialization of global tags .
def lazy_aggregated_tags
    @tags ||= table.inject(Hash.new(0)) do |hash, (_, wts)|
      wts.each do |word, tags|
        tags.each do |tag, count|
          next unless tag
          hash[tag] += count
        end
      end
      hash
    end
  end
def lazy_aggregated_tags @tags ||= table . inject ( Hash . new ( 0 ) ) do | hash , ( _ , wts ) | wts . each do | word , tags | tags . each do | tag , count | next unless tag hash [ tag ] += count end end hash end end
Perform lazy initialization of global tags.
Perform lazy initialization of global tags .