Sha256: 3e8b071fcfb35e91356b7b332cc3a659ccc9325c39387fbe6b59e19b2f8ac56c
Contents?: true
Size: 337 Bytes
Versions: 1
Compression:
Stored size: 337 Bytes
Contents
require_relative './unsupervised-language-detection/language-detector' 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unsupervised-language-detection-0.0.6 | lib/unsupervised-language-detection.rb |