foxdear_ebooks 3.1.7 → 3.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7528806bec7562081adb681ae9d8c392d22a783
4
- data.tar.gz: 04b06f7308d8e02cfedb756ec03bd029104b47d5
3
+ metadata.gz: b7b8c09c1a31d65195b5a931af9a7476fc2632ec
4
+ data.tar.gz: 447c89083facbdcabfa0766124b457aa2e9b5070
5
5
  SHA512:
6
- metadata.gz: fd2425e40aa71bc75782f3a3e58a573bee6bdded1956c27d7dc8d5885da7a8c8c499cb1451ca95743b4291cec96f72c7b374b7b2546c20bd611bcb97084b8590
7
- data.tar.gz: b517dcecc7026d9a493f2b5d69da31edbcb5775a2a05d79cd3d169092eb46e68ef0754da0316e2bcf1b147ab9ffe0dbf6841d9cb49b95128d72c18b648a6e8bc
6
+ metadata.gz: 53290f2cc4f0f88c9915033d550dc21e0b7f6424377d4aa8a3e0e89bf454bf131c6e57fffdb5b6a093457a89457f3a2e68e6bb914207b591cab3d7c357532728
7
+ data.tar.gz: 596f5231a17b5db3e0573328ed570251955636661a68937c1677f0c24330abef6994ce1a598f7d6de1f308ce32b67608659b04f979d3c38e7a05fc02edeeb0cb
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # twitter\_ebooks
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/foxdear_ebooks.svg)](http://badge.fury.io/rb/foxdear_ebooks)
4
- [![Build Status](https://travis-ci.org/mispy/foxdear_ebooks.svg)](https://travis-ci.org/mispy/foxdear_ebooks)
5
- [![Dependency Status](https://gemnasium.com/mispy/foxdear_ebooks.svg)](https://gemnasium.com/mispy/foxdear_ebooks)
4
+ [![Build Status](https://travis-ci.org/foxdear/foxdear_ebooks.svg)](https://travis-ci.org/foxdear/foxdear_ebooks)
5
+ [![Dependency Status](https://gemnasium.com/foxdear/foxdear_ebooks.svg)](https://gemnasium.com/foxdear/foxdear_ebooks)
6
6
 
7
7
  A framework for building interactive twitterbots which respond to mentions/DMs. See [ebooks_example](https://github.com/mispy/ebooks_example) for a fully-fledged bot definition.
8
8
 
@@ -101,7 +101,7 @@ module Ebooks
101
101
  def initialize
102
102
  @tokens = []
103
103
  @banned_words_file ||= 'banned_words.txt'
104
- @banned_words ||= File.exists?(@banned_words_file) ? File.read(@banned_words_file).split : []
104
+ @banned_words ||= File.exists?(@banned_words_file) ? File.read(@banned_words_file).split("\n") : []
105
105
  # Reverse lookup tiki by token, for faster generation
106
106
  @tikis = {}
107
107
  end
@@ -125,7 +125,7 @@ module Ebooks
125
125
  return if @banned_words_file == path
126
126
  @banned_words_file = path
127
127
  if File.exists?(@banned_words_file)
128
- @banned_words = File.read(@banned_words_file).split
128
+ @banned_words = File.read(@banned_words_file).split("\n")
129
129
  log "Successfully loaded banned words list #{path}"
130
130
  else
131
131
  log "Error: Banned words list #{path} does not exist"
@@ -87,7 +87,7 @@ module Ebooks
87
87
  # @return [Highscore::Keywords]
88
88
  def self.keywords(text)
89
89
  # Preprocess to remove stopwords (highscore's blacklist is v. slow)
90
- text = NLP.tokenize(text).reject { |t| stopword?(t) }.join(' ')
90
+ text = NLP.tokenize(text).reject { |t| stopword?(t) || t.start_with?('http') }.join(' ')
91
91
 
92
92
  text = Highscore::Content.new(text)
93
93
 
@@ -1,3 +1,3 @@
1
1
  module Ebooks
2
- VERSION = "3.1.7"
2
+ VERSION = "3.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foxdear_ebooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.7
4
+ version: 3.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kait Foxdear, Jaiden Mispy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-13 00:00:00.000000000 Z
11
+ date: 2018-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec