Method: NLPBackpack::FrequencyDistribution#to_tabulation

Defined in:
lib/nlp_backpack/frequency_distribution.rb

#to_tabulationObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/nlp_backpack/frequency_distribution.rb', line 13

def to_tabulation
  data = "\t#{@events.join("\t")}\n"

  process.each_pair do |condition, events|
    data << "#{condition}\t"
    @events.each {|e| data << "#{events[e]}\t"}
    data << "\n"
  end

  data
end