lateral_recommender 0.0.6 → 0.0.7
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 +4 -4
- data/README.md +1 -1
- data/bin/rspec +16 -0
- data/lateral_recommender.gemspec +4 -6
- data/lib/lateral_recommender.rb +18 -8
- data/lib/lateral_recommender/version.rb +1 -1
- data/spec/lateral_recommender_spec.rb +50 -74
- data/spec/spec_helper.rb +7 -7
- metadata +31 -120
- data/spec/fixtures/tapes/add.yml +0 -519
- data/spec/fixtures/tapes/invalid_key.yml +0 -40
- data/spec/fixtures/tapes/recommend_by_id.yml +0 -40
- data/spec/fixtures/tapes/recommend_by_id_arxiv.yml +0 -201
- data/spec/fixtures/tapes/recommend_by_id_news.yml +0 -379
- data/spec/fixtures/tapes/recommend_by_id_sec.yml +0 -12392
- data/spec/fixtures/tapes/recommend_by_id_wikipedia.yml +0 -125
- data/spec/fixtures/tapes/recommend_by_text.yml +0 -40
- data/spec/fixtures/tapes/recommend_by_text_arxiv.yml +0 -236
- data/spec/fixtures/tapes/recommend_by_text_news.yml +0 -294
- data/spec/fixtures/tapes/recommend_by_text_pubmed.yml +0 -251
- data/spec/fixtures/tapes/recommend_by_text_sec.yml +0 -11469
- data/spec/fixtures/tapes/recommend_by_text_wikipedia.yml +0 -118
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8491268138fe3245bfd4bf5d540c20a2f565ba7
|
4
|
+
data.tar.gz: 12982074d5851afb30352de54f0b1aecdb9d8f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa59ad025aeed4b98fe543ac9773d83cbaf9ecd26f3fbabcfebfc15aa946b6f11c42bdf136ecd2b0d18d3aa2a964cc823890caa008ab3ffde8e218a2a1f18983
|
7
|
+
data.tar.gz: 6bd9cdaab70c16e491c615c05ef830ebbe8a1ef3991535439847c61b9cdad95ed497a220678335cfd378e4047207ee855e989995b068dd39b0ef50ae910a6bc4
|
data/README.md
CHANGED
@@ -64,7 +64,7 @@ If you don't want to insert your own documents to the API, you can query one of
|
|
64
64
|
|
65
65
|
* **[arXiv](https://lateral.io/docs/text-matching/pre-populated-recommenders#arxiv)** - 1M+ academic papers in Physics, Mathematics and Computer Science (updated daily)
|
66
66
|
* **[News](https://lateral.io/docs/text-matching/pre-populated-recommenders#news)** - 250,000+ curated news articles (updated every 15mins)
|
67
|
-
* **[PubMed](https://lateral.io/docs/text-matching/pre-populated-recommenders#pubmed)** -
|
67
|
+
* **[PubMed](https://lateral.io/docs/text-matching/pre-populated-recommenders#pubmed)** - 6M+ medical journals (from before July 2014)
|
68
68
|
* **[SEC Data](https://lateral.io/docs/text-matching/pre-populated-recommenders#sec-data)** - 6,000+ yearly financial reports / 10-K filings (from 2014)
|
69
69
|
* **[Wikipedia](https://lateral.io/docs/text-matching/pre-populated-recommenders#wikipedia)** - 463,000 Wikipedia pages (which had 20+ page views in 2013)
|
70
70
|
|
data/bin/rspec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rspec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/lateral_recommender.gemspec
CHANGED
@@ -16,12 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
-
spec.add_development_dependency 'awesome_print'
|
20
|
-
spec.add_development_dependency 'rake'
|
21
|
-
spec.add_development_dependency 'rspec'
|
22
|
-
spec.add_development_dependency '
|
23
|
-
spec.add_development_dependency 'webmock', '~> 1.21', '>= 1.21.0'
|
24
|
-
spec.add_development_dependency 'yard', '~> 0.8', '>= 0.8.7.6'
|
19
|
+
spec.add_development_dependency 'awesome_print'
|
20
|
+
spec.add_development_dependency 'rake'
|
21
|
+
spec.add_development_dependency 'rspec'
|
22
|
+
spec.add_development_dependency 'yard'
|
25
23
|
|
26
24
|
spec.add_runtime_dependency 'httparty'
|
27
25
|
spec.add_runtime_dependency 'json'
|
data/lib/lateral_recommender.rb
CHANGED
@@ -5,15 +5,15 @@ require 'json'
|
|
5
5
|
|
6
6
|
module LateralRecommender
|
7
7
|
class API
|
8
|
-
|
8
|
+
JSON_HEADERS = { 'Content-Type' => 'application/json' }
|
9
|
+
EXTERNAL_CORPORA = %w(arxiv news pubmed sec wikipedia bloomberg-public)
|
9
10
|
|
10
11
|
# @param [String] key The Lateral API key
|
11
|
-
# @param [String] corpus The corpora to recommend from e.g. arxiv, sec, pubmed, wikipedia, news
|
12
|
+
# @param [String] corpus The corpora to recommend from e.g. arxiv, sec, pubmed, wikipedia, news, bloomberg-public
|
12
13
|
def initialize(key, corpus = 'recommender')
|
13
|
-
corpus = EXTERNAL_CORPORA.include?(corpus) ? corpus : 'recommender'
|
14
|
-
@endpoint = "https://#{corpus}-api.lateral.io/"
|
14
|
+
@corpus = EXTERNAL_CORPORA.include?(corpus) ? corpus : 'recommender'
|
15
|
+
@endpoint = "https://#{@corpus}-api.lateral.io/"
|
15
16
|
@key = key
|
16
|
-
# @client = HTTPClient.new
|
17
17
|
end
|
18
18
|
|
19
19
|
# Add a document to the recommender
|
@@ -65,7 +65,7 @@ module LateralRecommender
|
|
65
65
|
|
66
66
|
private
|
67
67
|
|
68
|
-
def
|
68
|
+
def parse_request(request)
|
69
69
|
return { error: error(request) } if request.code != 200 && request.code != 201
|
70
70
|
JSON.parse(request.body)
|
71
71
|
end
|
@@ -81,11 +81,21 @@ module LateralRecommender
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def post(path, params)
|
84
|
-
|
84
|
+
return parse_request request 'post', path, params if @corpus == 'recommender'
|
85
|
+
parse_request request_json 'post', path, params.merge(collection: [@corpus])
|
85
86
|
end
|
86
87
|
|
87
88
|
def get(path, params)
|
88
|
-
|
89
|
+
return parse_request request 'get', path, params if @corpus == 'recommender'
|
90
|
+
parse_request request_json 'get', path, params.merge(collection: [@corpus])
|
91
|
+
end
|
92
|
+
|
93
|
+
def request(method, path, params)
|
94
|
+
HTTParty.send method, url(path), body: params
|
95
|
+
end
|
96
|
+
|
97
|
+
def request_json(method, path, params)
|
98
|
+
HTTParty.send method, url(path), body: params.to_json, headers: JSON_HEADERS
|
89
99
|
end
|
90
100
|
end
|
91
101
|
end
|
@@ -1,132 +1,108 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe LateralRecommender do
|
4
|
+
|
5
|
+
# Clear the test key first
|
6
|
+
HTTParty.post "https://recommender-api.lateral.io/delete-all/?subscription-key=#{ENV['API_KEY']}"
|
7
|
+
|
4
8
|
describe 'API' do
|
5
9
|
let(:api) { LateralRecommender::API.new ENV['API_KEY'] }
|
6
10
|
let(:body) { File.read('spec/fixtures/article-body.txt') }
|
7
11
|
|
8
12
|
it 'errors with invalid API key' do
|
9
13
|
api = LateralRecommender::API.new 'no'
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
expect(response[:error][:message]).to include('credentials are invalid')
|
14
|
-
end
|
14
|
+
response = api.recommend_by_text 'test'
|
15
|
+
expect(response[:error][:status_code]).to eq(403)
|
16
|
+
expect(response[:error][:message]).to include('Invalid authentication credentials')
|
15
17
|
end
|
16
18
|
|
17
19
|
it 'adds a document' do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
expect(response['text']).to include('Space exploration')
|
22
|
-
end
|
20
|
+
response = api.add document_id: 'doc_id', text: body
|
21
|
+
expect(response['document_id']).to eq('doc_id')
|
22
|
+
expect(response['text']).to include('Space exploration')
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'gets recommendations from text' do
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
expect(response.first['document_id']).to eq('doc_id')
|
30
|
-
end
|
26
|
+
response = api.recommend_by_text body
|
27
|
+
expect(response.length).to eq(1)
|
28
|
+
expect(response.first['document_id']).to eq('doc_id')
|
31
29
|
end
|
32
30
|
|
33
31
|
it 'gets recommendations by ID' do
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
expect(response.first['document_id']).to eq('doc_id')
|
38
|
-
end
|
32
|
+
response = api.recommend_by_id 'doc_id'
|
33
|
+
expect(response.length).to eq(1)
|
34
|
+
expect(response.first['document_id']).to eq('doc_id')
|
39
35
|
end
|
40
36
|
|
41
37
|
it 'gets recommendations by text in SEC' do
|
42
38
|
api = LateralRecommender::API.new ENV['API_KEY'], 'sec'
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
expect(response.first['title']).to include('DIGITALGLOBE, INC._2014_10')
|
47
|
-
end
|
39
|
+
response = api.recommend_by_text body, collections: %w(item1a)
|
40
|
+
expect(response.length).to eq(10)
|
41
|
+
expect(response.first['title']).to include('DIGITALGLOBE, INC._2014_10')
|
48
42
|
end
|
49
43
|
|
50
44
|
it 'gets recommendations by ID in SEC' do
|
51
45
|
api = LateralRecommender::API.new ENV['API_KEY'], 'sec'
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
expect(response.first['title']).to include('DESTINY MEDIA TECHNOLOGIES')
|
57
|
-
end
|
46
|
+
id = 'SEC_item_1A-http://www.sec.gov/Archives/edgar/data/1099369/0001062993-14-006877.txt_item_1A'
|
47
|
+
response = api.recommend_by_id id, collections: %w(item1a)
|
48
|
+
expect(response.length).to eq(10)
|
49
|
+
expect(response.first['title']).to include('DESTINY MEDIA TECHNOLOGIES')
|
58
50
|
end
|
59
51
|
|
60
52
|
it 'gets recommendations by text in news' do
|
61
53
|
api = LateralRecommender::API.new ENV['API_KEY'], 'news'
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
expect(response.first['title']).to include('NASA announces details of ')
|
66
|
-
end
|
54
|
+
response = api.recommend_by_text body
|
55
|
+
expect(response.length).to be > 10 # This should be done better
|
56
|
+
expect(response.first['title']).to include('NASA Announces Next Steps ')
|
67
57
|
end
|
68
58
|
|
69
59
|
it 'gets recommendations from ID in news' do
|
70
60
|
api = LateralRecommender::API.new ENV['API_KEY'], 'news'
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
expect(response.first['title']).to include('Goodbye MongoDB, Hello Pos')
|
75
|
-
end
|
61
|
+
response = api.recommend_by_id '3076491'
|
62
|
+
expect(response.length).to be > 10 # This should be done better
|
63
|
+
expect(response.first['title']).to include('Tree structure query with ')
|
76
64
|
end
|
77
65
|
|
78
66
|
it 'gets recommendations by text in wikipedia' do
|
79
67
|
api = LateralRecommender::API.new ENV['API_KEY'], 'wikipedia'
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
expect(response.first['title']).to eq('Space exploration')
|
84
|
-
end
|
68
|
+
response = api.recommend_by_text body
|
69
|
+
expect(response.length).to eq(10)
|
70
|
+
expect(response.first['title']).to eq('Space exploration')
|
85
71
|
end
|
86
72
|
|
87
73
|
it 'gets recommendations by ID in wikipedia' do
|
88
74
|
api = LateralRecommender::API.new ENV['API_KEY'], 'wikipedia'
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
expect(response.first['title']).to eq('Manned mission to Mars')
|
93
|
-
end
|
75
|
+
response = api.recommend_by_id 'wikipedia-11589297'
|
76
|
+
expect(response.length).to eq(10)
|
77
|
+
expect(response.first['title']).to eq('Manned mission to Mars')
|
94
78
|
end
|
95
79
|
|
96
80
|
it 'gets recommendations by text in pubmed' do
|
97
81
|
api = LateralRecommender::API.new ENV['API_KEY'], 'pubmed'
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
expect(response.first['title']).to include('NASA and the search')
|
102
|
-
end
|
82
|
+
response = api.recommend_by_text body
|
83
|
+
expect(response.length).to eq(10)
|
84
|
+
expect(response.first['title']).to include('NASA and the search')
|
103
85
|
end
|
104
86
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
# end
|
112
|
-
# end
|
87
|
+
it 'gets recommendations by ID in pubmed' do
|
88
|
+
api = LateralRecommender::API.new ENV['API_KEY'], 'pubmed'
|
89
|
+
response = api.recommend_by_id 'pubmed-15881781-1'
|
90
|
+
expect(response.length).to eq(10)
|
91
|
+
expect(response.first['title']).to include('Radiation analysis ')
|
92
|
+
end
|
113
93
|
|
114
94
|
it 'gets recommendations by text in arxiv' do
|
115
95
|
api = LateralRecommender::API.new ENV['API_KEY'], 'arxiv'
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
expect(response.first['title']).to include('A Lunar L2-Farside')
|
120
|
-
end
|
96
|
+
response = api.recommend_by_text body
|
97
|
+
expect(response.length).to eq(10)
|
98
|
+
expect(response.first['title']).to include('A Lunar L2-Farside')
|
121
99
|
end
|
122
100
|
|
123
101
|
it 'gets recommendations by ID in arxiv' do
|
124
102
|
api = LateralRecommender::API.new ENV['API_KEY'], 'arxiv'
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
expect(response.first['title']).to include('Set-valued sorting index')
|
129
|
-
end
|
103
|
+
response = api.recommend_by_id 'arxiv-http://arxiv.org/abs/1403.2165'
|
104
|
+
expect(response.length).to eq(10)
|
105
|
+
expect(response.first['title']).to include('Set-valued sorting index')
|
130
106
|
end
|
131
107
|
end
|
132
108
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'env_vars' unless ENV.include? 'TRAVIS_BUILD_ID'
|
2
|
-
require 'vcr'
|
2
|
+
# require 'vcr'
|
3
3
|
require 'ap'
|
4
4
|
require 'lateral_recommender'
|
5
|
-
require 'webmock/rspec'
|
5
|
+
# require 'webmock/rspec'
|
6
6
|
|
7
|
-
VCR.configure do |c|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
7
|
+
# VCR.configure do |c|
|
8
|
+
# c.cassette_library_dir = 'spec/fixtures/tapes'
|
9
|
+
# c.hook_into :webmock
|
10
|
+
# c.filter_sensitive_data('<API_KEY>') { ENV['API_KEY'] }
|
11
|
+
# end
|
metadata
CHANGED
@@ -1,161 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lateral_recommender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Novakovic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.6.1
|
19
|
+
version: '0'
|
23
20
|
type: :development
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.6'
|
30
|
-
- - '>='
|
24
|
+
- - ">="
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
26
|
+
version: '0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rake
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- -
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '10.4'
|
40
|
-
- - '>='
|
31
|
+
- - ">="
|
41
32
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
33
|
+
version: '0'
|
43
34
|
type: :development
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
|
-
- -
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '10.4'
|
50
|
-
- - '>='
|
38
|
+
- - ">="
|
51
39
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
40
|
+
version: '0'
|
53
41
|
- !ruby/object:Gem::Dependency
|
54
42
|
name: rspec
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
56
44
|
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '3.2'
|
60
|
-
- - '>='
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 3.2.0
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '3.2'
|
70
|
-
- - '>='
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 3.2.0
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: vcr
|
75
|
-
requirement: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
- - ~>
|
45
|
+
- - ">="
|
78
46
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
80
|
-
- - '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 2.9.3
|
83
|
-
type: :development
|
84
|
-
prerelease: false
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ~>
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '2.9'
|
90
|
-
- - '>='
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 2.9.3
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: webmock
|
95
|
-
requirement: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - ~>
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '1.21'
|
100
|
-
- - '>='
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 1.21.0
|
47
|
+
version: '0'
|
103
48
|
type: :development
|
104
49
|
prerelease: false
|
105
50
|
version_requirements: !ruby/object:Gem::Requirement
|
106
51
|
requirements:
|
107
|
-
- -
|
52
|
+
- - ">="
|
108
53
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
110
|
-
- - '>='
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 1.21.0
|
54
|
+
version: '0'
|
113
55
|
- !ruby/object:Gem::Dependency
|
114
56
|
name: yard
|
115
57
|
requirement: !ruby/object:Gem::Requirement
|
116
58
|
requirements:
|
117
|
-
- -
|
59
|
+
- - ">="
|
118
60
|
- !ruby/object:Gem::Version
|
119
|
-
version: '0
|
120
|
-
- - '>='
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: 0.8.7.6
|
61
|
+
version: '0'
|
123
62
|
type: :development
|
124
63
|
prerelease: false
|
125
64
|
version_requirements: !ruby/object:Gem::Requirement
|
126
65
|
requirements:
|
127
|
-
- -
|
66
|
+
- - ">="
|
128
67
|
- !ruby/object:Gem::Version
|
129
|
-
version: '0
|
130
|
-
- - '>='
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: 0.8.7.6
|
68
|
+
version: '0'
|
133
69
|
- !ruby/object:Gem::Dependency
|
134
70
|
name: httparty
|
135
71
|
requirement: !ruby/object:Gem::Requirement
|
136
72
|
requirements:
|
137
|
-
- -
|
73
|
+
- - ">="
|
138
74
|
- !ruby/object:Gem::Version
|
139
75
|
version: '0'
|
140
76
|
type: :runtime
|
141
77
|
prerelease: false
|
142
78
|
version_requirements: !ruby/object:Gem::Requirement
|
143
79
|
requirements:
|
144
|
-
- -
|
80
|
+
- - ">="
|
145
81
|
- !ruby/object:Gem::Version
|
146
82
|
version: '0'
|
147
83
|
- !ruby/object:Gem::Dependency
|
148
84
|
name: json
|
149
85
|
requirement: !ruby/object:Gem::Requirement
|
150
86
|
requirements:
|
151
|
-
- -
|
87
|
+
- - ">="
|
152
88
|
- !ruby/object:Gem::Version
|
153
89
|
version: '0'
|
154
90
|
type: :runtime
|
155
91
|
prerelease: false
|
156
92
|
version_requirements: !ruby/object:Gem::Requirement
|
157
93
|
requirements:
|
158
|
-
- -
|
94
|
+
- - ">="
|
159
95
|
- !ruby/object:Gem::Version
|
160
96
|
version: '0'
|
161
97
|
description:
|
@@ -165,32 +101,20 @@ executables: []
|
|
165
101
|
extensions: []
|
166
102
|
extra_rdoc_files: []
|
167
103
|
files:
|
168
|
-
- .editorconfig
|
169
|
-
- .gitignore
|
170
|
-
- .rspec
|
171
|
-
- .rubocop.yml
|
172
|
-
- .travis.yml
|
104
|
+
- ".editorconfig"
|
105
|
+
- ".gitignore"
|
106
|
+
- ".rspec"
|
107
|
+
- ".rubocop.yml"
|
108
|
+
- ".travis.yml"
|
173
109
|
- Gemfile
|
174
110
|
- LICENSE.txt
|
175
111
|
- README.md
|
176
112
|
- Rakefile
|
113
|
+
- bin/rspec
|
177
114
|
- lateral_recommender.gemspec
|
178
115
|
- lib/lateral_recommender.rb
|
179
116
|
- lib/lateral_recommender/version.rb
|
180
117
|
- spec/fixtures/article-body.txt
|
181
|
-
- spec/fixtures/tapes/add.yml
|
182
|
-
- spec/fixtures/tapes/invalid_key.yml
|
183
|
-
- spec/fixtures/tapes/recommend_by_id.yml
|
184
|
-
- spec/fixtures/tapes/recommend_by_id_arxiv.yml
|
185
|
-
- spec/fixtures/tapes/recommend_by_id_news.yml
|
186
|
-
- spec/fixtures/tapes/recommend_by_id_sec.yml
|
187
|
-
- spec/fixtures/tapes/recommend_by_id_wikipedia.yml
|
188
|
-
- spec/fixtures/tapes/recommend_by_text.yml
|
189
|
-
- spec/fixtures/tapes/recommend_by_text_arxiv.yml
|
190
|
-
- spec/fixtures/tapes/recommend_by_text_news.yml
|
191
|
-
- spec/fixtures/tapes/recommend_by_text_pubmed.yml
|
192
|
-
- spec/fixtures/tapes/recommend_by_text_sec.yml
|
193
|
-
- spec/fixtures/tapes/recommend_by_text_wikipedia.yml
|
194
118
|
- spec/lateral_recommender_spec.rb
|
195
119
|
- spec/spec_helper.rb
|
196
120
|
homepage: https://github.com/lateral/recommender-gem
|
@@ -203,34 +127,21 @@ require_paths:
|
|
203
127
|
- lib
|
204
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|
205
129
|
requirements:
|
206
|
-
- -
|
130
|
+
- - ">="
|
207
131
|
- !ruby/object:Gem::Version
|
208
132
|
version: '0'
|
209
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
134
|
requirements:
|
211
|
-
- -
|
135
|
+
- - ">="
|
212
136
|
- !ruby/object:Gem::Version
|
213
137
|
version: '0'
|
214
138
|
requirements: []
|
215
139
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.4.
|
140
|
+
rubygems_version: 2.4.5
|
217
141
|
signing_key:
|
218
142
|
specification_version: 4
|
219
143
|
summary: Wrapper around the Lateral API.
|
220
144
|
test_files:
|
221
145
|
- spec/fixtures/article-body.txt
|
222
|
-
- spec/fixtures/tapes/add.yml
|
223
|
-
- spec/fixtures/tapes/invalid_key.yml
|
224
|
-
- spec/fixtures/tapes/recommend_by_id.yml
|
225
|
-
- spec/fixtures/tapes/recommend_by_id_arxiv.yml
|
226
|
-
- spec/fixtures/tapes/recommend_by_id_news.yml
|
227
|
-
- spec/fixtures/tapes/recommend_by_id_sec.yml
|
228
|
-
- spec/fixtures/tapes/recommend_by_id_wikipedia.yml
|
229
|
-
- spec/fixtures/tapes/recommend_by_text.yml
|
230
|
-
- spec/fixtures/tapes/recommend_by_text_arxiv.yml
|
231
|
-
- spec/fixtures/tapes/recommend_by_text_news.yml
|
232
|
-
- spec/fixtures/tapes/recommend_by_text_pubmed.yml
|
233
|
-
- spec/fixtures/tapes/recommend_by_text_sec.yml
|
234
|
-
- spec/fixtures/tapes/recommend_by_text_wikipedia.yml
|
235
146
|
- spec/lateral_recommender_spec.rb
|
236
147
|
- spec/spec_helper.rb
|