blob: fc21f6cb98831ef587458bea3757b80d4ac1d1e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env ruby
require 'zipf'
dense_features = ReadFile.readlines_strip "#{File.dirname(__FILE__)}/dense_features.txt"
sep = " "
while line = STDIN.gets
a = line.strip.split
a.reject! { |i|
!dense_features.include?(i.split('=').first)
}
puts a.join sep
end
|