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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9ed0bcb626b22f36b5fec599384f8a7052c4194
4
- data.tar.gz: 3e490355d08fea08f7a38fa48fe168cba50ae5e6
3
+ metadata.gz: c225096bd3419d288e7968ac6ba4f1102567ad3d
4
+ data.tar.gz: ea86c1d136084ca08b1939b4de9352be5fcfa305
5
5
  SHA512:
6
- metadata.gz: 6a6cf2fe9a8736e95b79290e558d2242a0d8622fce45bad59282ef12f794a52f03e2d9e26c26ac2d27c7470d1d70e654ed2a5ddbcfe850d8f1d8aea71d9e8adc
7
- data.tar.gz: 9ea154fad831a040ef822978a514d97a448e00a556e521c27fd7aee64ab49ee97b2dc0d33b7b55adefb8817c3db050a32c82123ce75ca4f6d81acb5184d70989
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
@@ -1 +1,2 @@
1
1
  --color
2
+ --format documentation
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module RecommenderCore
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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(params_item_based)).to_not be_nil }
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.2
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-18 00:00:00.000000000 Z
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.2.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