Sha256: 2b5774c76ab87f8209c4fc64626a6a8e778a8d81ed35dc3ba9465a9c3edd4490
Contents?: true
Size: 357 Bytes
Versions: 4
Compression:
Stored size: 357 Bytes
Contents
require File.expand_path('../unsupervised-language-detection/language-detector', __FILE__) module UnsupervisedLanguageDetection def self.is_english_tweet?(tweet) @detector ||= LanguageDetector.load_yaml(File.expand_path('../unsupervised-language-detection/english-tweet-detector.yaml', __FILE__)) @detector.classify(tweet) == "majority" end end
Version data entries
4 entries across 4 versions & 1 rubygems