fixed merge conflict
commit
a2f3259fdf
|
@ -130,6 +130,7 @@ def process_file (file_name, binfile, type)
|
|||
csv.each { |bin| bins[bin[0]] = bin[1..].compact } #turn the csv array into a hash, remove nils
|
||||
outfile = file_name
|
||||
outfile.slice!('.txt')
|
||||
<<<<<<< HEAD
|
||||
if type == 'iat'
|
||||
text = strip_text(text, 'PLOVEINTAKE', 'PLOVECLOSING') if type == 'iat'
|
||||
output = Hash.new #Creating the output storage object
|
||||
|
@ -166,6 +167,16 @@ def process_file (file_name, binfile, type)
|
|||
write_output_json(output,outfile + '-out.json')
|
||||
write_output_csv(output,outfile + '-out.csv')
|
||||
end
|
||||
=======
|
||||
puts outfile
|
||||
output[:filename] = outfile
|
||||
csv.each { |bin| bins[bin[0]] = bin[1..].compact } #turn the csv array into a hash, remove nils
|
||||
bins.each_key do |bin_number|
|
||||
key = bin_number.to_sym
|
||||
output[key] = Hash.new
|
||||
output[key][:words] = bin_counter(bins[bin_number], text)
|
||||
output[key][:total] = count_total(output[key])
|
||||
>>>>>>> d40b0ae9853ecb6d5d479ea121a7a3cdba00323c
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue