recommender-core 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.autotest +0 -8
- data/.rspec +1 -0
- data/lib/recommender_core/handler.rb +2 -1
- data/lib/recommender_core/version.rb +1 -1
- data/spec/handler_spec.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c225096bd3419d288e7968ac6ba4f1102567ad3d
|
4
|
+
data.tar.gz: ea86c1d136084ca08b1939b4de9352be5fcfa305
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f139d2c6824379ab8dcaf9d131920665e278795911a5d483ead2ebe981457288c234bbd607f2deccbe4845f4f86fb8dea7aba36371815c343ab8bf4f7a6eb0d2
|
7
|
+
data.tar.gz: 7ed578dfc1fe4c621ab2fdfc2b7bb4c7b3121f16267e649af862fb7e89017512181b393fd601d333fef77cd9352934787b7900e88fa84aba0ce413b086638781
|
data/.autotest
CHANGED
@@ -1,9 +1 @@
|
|
1
1
|
require 'autotest/fsevent'
|
2
|
-
|
3
|
-
class Autotest::Rspec2 < Autotest
|
4
|
-
def make_test_cmd(files_to_test)
|
5
|
-
files_to_test.empty? ? '' :
|
6
|
-
"#{prefix}#{ruby}#{suffix} --ng -S '#{RSPEC_EXECUTABLE}' --tty \
|
7
|
-
#{normalize(files_to_test).keys.flatten.map { |f| "'#{f}'"}.join(' ')}"
|
8
|
-
end
|
9
|
-
end
|
data/.rspec
CHANGED
@@ -10,7 +10,8 @@ class RecommenderCore::Handler
|
|
10
10
|
|
11
11
|
def self.similar_items(params)
|
12
12
|
recommender = init_recommender(params[:hash])
|
13
|
-
recommender.similar_items(params[:id], params[:nb_wanted], params[:rescorer])
|
13
|
+
sim_items = recommender.similar_items(params[:id], params[:nb_wanted], params[:rescorer])
|
14
|
+
sim_items.map!{ |item| {id: item.getItemID, score: item.getValue} }
|
14
15
|
end
|
15
16
|
|
16
17
|
def self.recommend_items(params)
|
data/spec/handler_spec.rb
CHANGED
@@ -25,10 +25,11 @@ describe RecommenderCore::Handler do
|
|
25
25
|
|
26
26
|
describe '.similar_items' do
|
27
27
|
it { expect(RecommenderCore::Handler.similar_items(params_item_based)).to_not be_nil }
|
28
|
+
it { expect(RecommenderCore::Handler.similar_items(params_item_based).class).to eq Array }
|
28
29
|
end
|
29
30
|
|
30
31
|
describe '.recommend_items' do
|
31
|
-
it { expect(RecommenderCore::Handler.recommend_items(
|
32
|
+
it { expect(RecommenderCore::Handler.recommend_items(params_user_based)).to_not be_nil }
|
32
33
|
end
|
33
34
|
|
34
35
|
describe '.evaluate' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recommender-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- atacraft & fabira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.1.9
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: The core module of the recommender
|