RedditPostClassifierBot 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc702c8142af33798cd4105a225d66bb494de9d8
|
4
|
+
data.tar.gz: e4fbb1206147d9ba5f162e4d9f7c0e421a20d422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c200ef8b3c100d43041c2cebe2f805ea2e75bcd666058acc06eaf4a23889c0ace7c5d3f116469b4c27e11242d06e8a1cec49d823a0d000bef53530ca2f838887
|
7
|
+
data.tar.gz: ea1839df63d9437e28174d258ede4783bd904f76a6cd128f2f49c9213bf3557ecb3a40a016e308e13168ffebfe79cbca09ecbed56986223e50f06a963c7abfee
|
@@ -2,6 +2,10 @@ module RedditPostClassifierBot
|
|
2
2
|
class NBayesClassifier
|
3
3
|
NBAYES_FILE = ENV.fetch "NBAYES_FILE_PATH", "./RPCB-nbayes.yml"
|
4
4
|
|
5
|
+
def self.trained?
|
6
|
+
File.exists?(NBAYES_FILE) && File.read(NBAYES_FILE).chomp.size > 100
|
7
|
+
end
|
8
|
+
|
5
9
|
def initialize
|
6
10
|
@nbayes = NBayes::Base.new
|
7
11
|
end
|