puts row[2].gsub(/\@[a-zA-Z0-9_]+/, "").gsub(%r!https?://\S+!, "") }' | head -5000 | docker run -i docker-mecab-neologd:latest | grep '名詞' | cut -f 1 | sort | grep -v '^.$' | ruby -e ' c = 1; p = nil; while gets if $_.chomp==p then c+=1 else puts "#{c} #{p}"; c=1; p=$_.chomp end end' | sort -nr | head -30 Thanks nownabe/docker-mecab-neologd