Sha256: 80253f812343b9cfcfce5c8f799abe5065ab6f791f63268db218516249f6ec92

Contents?: true

Size: 316 Bytes

Versions: 23

Compression:

Stored size: 316 Bytes

Contents

#!/usr/bin/env ruby
# encoding: utf-8

require 'json'

freqmap = {}

data = File.read("data/ANC-all-count.txt")
data = data.unpack("C*").pack("U*")

data.lines.each do |l|
  vals = l.split("\t")
  
  freqmap[vals[0]] = vals[-1].to_i
end

File.open("data/wordfreq.json", 'w') do |f|
  f.write(JSON.dump(freqmap))
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
twitter_ebooks-2.2.6 script/process_anc_data.rb
twitter_ebooks-2.2.5 script/process_anc_data.rb
twitter_ebooks-2.2.4 script/process_anc_data.rb
twitter_ebooks-2.2.3 script/process_anc_data.rb
twitter_ebooks-2.2.2 script/process_anc_data.rb
twitter_ebooks-2.2.1 script/process_anc_data.rb
twitter_ebooks-2.2.0 script/process_anc_data.rb
twitter_ebooks-2.1.9 script/process_anc_data.rb
twitter_ebooks-2.1.8 script/process_anc_data.rb
twitter_ebooks-2.1.7 script/process_anc_data.rb
twitter_ebooks-2.1.6 script/process_anc_data.rb
twitter_ebooks-2.1.5 script/process_anc_data.rb
twitter_ebooks-2.1.4 script/process_anc_data.rb
twitter_ebooks-2.1.3 script/process_anc_data.rb
twitter_ebooks-2.1.2 script/process_anc_data.rb
twitter_ebooks-2.1.1 script/process_anc_data.rb
twitter_ebooks-2.1.0 script/process_anc_data.rb
twitter_ebooks-2.0.9 script/process_anc_data.rb
twitter_ebooks-2.0.8 script/process_anc_data.rb
twitter_ebooks-2.0.7 script/process_anc_data.rb