lib/name-spotter.rb in name-spotter-0.2.4 vs lib/name-spotter.rb in name-spotter-0.3.0

- old
+ new

@@ -21,10 +21,12 @@ res[-1] << w end end res end - eng, not_eng = tweets.shuffle[0...50].partition {|a| UnsupervisedLanguageDetection.is_english_tweet?(a.join(" "))} + eng, not_eng = tweets.shuffle[0...50].partition do |a| + UnsupervisedLanguageDetection.is_english_tweet?(a.join(" ")) + end percentage = eng.size.to_f/(not_eng.size + eng.size) percentage > 0.5 end def initialize(client)