Sha256: 76357d6430ea774d3db48aca840cca2664b33363827df4ff0e70b3146b1c948b
Contents?: true
Size: 411 Bytes
Versions: 1
Compression:
Stored size: 411 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 UnsupervisedLanguageDetection.is_english_tweet?("http://www.test.com/ ")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unsupervised-language-detection-0.0.5 | lib/unsupervised-language-detection.rb |