indico 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/indico/multi.rb CHANGED
@@ -16,7 +16,8 @@ module Indico
16
16
  "image_features" => "imagefeatures",
17
17
  "content_filtering" => "contentfiltering",
18
18
  "twitter_engagement" => "twitterengagement",
19
- "myers_briigs" => "myersbriggs"
19
+ "personality" => "personality",
20
+ "personas" => "personas"
20
21
  }
21
22
 
22
23
  SERVER_TO_CLIENT = CLIENT_TO_SERVER.invert
@@ -17,7 +17,8 @@ TEXT_APIS = [
17
17
  "named_entities",
18
18
  "people",
19
19
  "places",
20
- "organizations"
20
+ "organizations",
21
+ "textfeatures"
21
22
  ]
22
23
  IMAGE_APIS = [
23
24
  "fer",
@@ -1,3 +1,3 @@
1
1
  module Indico
2
- VERSION = '0.6.3'
2
+ VERSION = '0.7.0'
3
3
  end
data/lib/indico.rb CHANGED
@@ -76,6 +76,10 @@ module Indico
76
76
  return api_handler(text, 'relevance', config)
77
77
  end
78
78
 
79
+ def self.text_features(text, config = nil)
80
+ return api_handler(text, 'textfeatures', config)
81
+ end
82
+
79
83
  def self.people(text, config = nil)
80
84
  api_handler(text, "people", config)
81
85
  end
@@ -50,6 +50,12 @@ describe Indico do
50
50
  expect result[0][0] >= 0.5
51
51
  end
52
52
 
53
+ it 'should return the feature vector for given input text' do
54
+ text = ['Queen of England', 'Prime Minister of Canada']
55
+ result = Indico.text_features(text)
56
+ expect result[0].length == 300
57
+ end
58
+
53
59
  it 'should return people found in the text provided' do
54
60
  text = ["Chef Michael Solomonov's gorgeous cookbook \"Zahav\" is taking up too much space on my dining room table, but his family stories, recipes and photography keep me from shelving it."]
55
61
  text += text
data/spec/indico_spec.rb CHANGED
@@ -151,6 +151,12 @@ describe Indico do
151
151
  expect result[0] >= 0.5
152
152
  end
153
153
 
154
+ it 'should return the feature vector for given input text' do
155
+ text = 'Queen of England'
156
+ result = Indico.text_features(text)
157
+ expect result.length == 300
158
+ end
159
+
154
160
  it 'should return people found in the text provided' do
155
161
  text = "Chef Michael Solomonov's gorgeous cookbook \"Zahav\" is taking up too much space on my dining room table, but his family stories, recipes and photography keep me from shelving it."
156
162
  result = Indico.people(text).sort_by { |k| -k["confidence"] }
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Slater Victoroff
@@ -11,76 +12,86 @@ authors:
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2015-12-17 00:00:00.000000000 Z
15
+ date: 2016-01-22 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: inifile
18
19
  requirement: !ruby/object:Gem::Requirement
20
+ none: false
19
21
  requirements:
20
- - - "~>"
22
+ - - ~>
21
23
  - !ruby/object:Gem::Version
22
24
  version: 3.0.0
23
25
  type: :runtime
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
- - - "~>"
30
+ - - ~>
28
31
  - !ruby/object:Gem::Version
29
32
  version: 3.0.0
30
33
  - !ruby/object:Gem::Dependency
31
34
  name: oily_png
32
35
  requirement: !ruby/object:Gem::Requirement
36
+ none: false
33
37
  requirements:
34
- - - "~>"
38
+ - - ~>
35
39
  - !ruby/object:Gem::Version
36
40
  version: 1.2.0
37
41
  type: :runtime
38
42
  prerelease: false
39
43
  version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
40
45
  requirements:
41
- - - "~>"
46
+ - - ~>
42
47
  - !ruby/object:Gem::Version
43
48
  version: 1.2.0
44
49
  - !ruby/object:Gem::Dependency
45
50
  name: bundler
46
51
  requirement: !ruby/object:Gem::Requirement
52
+ none: false
47
53
  requirements:
48
- - - "~>"
54
+ - - ~>
49
55
  - !ruby/object:Gem::Version
50
56
  version: '1.6'
51
57
  type: :development
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
54
61
  requirements:
55
- - - "~>"
62
+ - - ~>
56
63
  - !ruby/object:Gem::Version
57
64
  version: '1.6'
58
65
  - !ruby/object:Gem::Dependency
59
66
  name: rake
60
67
  requirement: !ruby/object:Gem::Requirement
68
+ none: false
61
69
  requirements:
62
- - - ">="
70
+ - - ! '>='
63
71
  - !ruby/object:Gem::Version
64
72
  version: '0'
65
73
  type: :development
66
74
  prerelease: false
67
75
  version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
68
77
  requirements:
69
- - - ">="
78
+ - - ! '>='
70
79
  - !ruby/object:Gem::Version
71
80
  version: '0'
72
81
  - !ruby/object:Gem::Dependency
73
82
  name: rspec
74
83
  requirement: !ruby/object:Gem::Requirement
84
+ none: false
75
85
  requirements:
76
- - - ">="
86
+ - - ! '>='
77
87
  - !ruby/object:Gem::Version
78
88
  version: '0'
79
89
  type: :development
80
90
  prerelease: false
81
91
  version_requirements: !ruby/object:Gem::Requirement
92
+ none: false
82
93
  requirements:
83
- - - ">="
94
+ - - ! '>='
84
95
  - !ruby/object:Gem::Version
85
96
  version: '0'
86
97
  description: A simple Ruby Wrapper for the indico set of APIs.
@@ -93,8 +104,8 @@ executables: []
93
104
  extensions: []
94
105
  extra_rdoc_files: []
95
106
  files:
96
- - ".gitignore"
97
- - ".rspec"
107
+ - .gitignore
108
+ - .rspec
98
109
  - Gemfile
99
110
  - LICENSE.txt
100
111
  - README.md
@@ -123,25 +134,26 @@ files:
123
134
  homepage: https://github.com/IndicoDataSolutions/IndicoIo-ruby
124
135
  licenses:
125
136
  - MIT
126
- metadata: {}
127
137
  post_install_message:
128
138
  rdoc_options: []
129
139
  require_paths:
130
140
  - lib
131
141
  required_ruby_version: !ruby/object:Gem::Requirement
142
+ none: false
132
143
  requirements:
133
- - - ">="
144
+ - - ! '>='
134
145
  - !ruby/object:Gem::Version
135
146
  version: '0'
136
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
+ none: false
137
149
  requirements:
138
- - - ">="
150
+ - - ! '>='
139
151
  - !ruby/object:Gem::Version
140
152
  version: '0'
141
153
  requirements: []
142
154
  rubyforge_project:
143
- rubygems_version: 2.4.6
155
+ rubygems_version: 1.8.23
144
156
  signing_key:
145
- specification_version: 4
157
+ specification_version: 3
146
158
  summary: A simple Ruby Wrapper for the indico set of APIs.
147
159
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: cba55adc387286a8032d815e3934791cb6b1098b
4
- data.tar.gz: f3b525cd00b9bab9d2221fb34067951137d805f2
5
- SHA512:
6
- metadata.gz: 0e1e8df25001947843a37437a1278ec657c431196070f6e6f8ed715e083751711426e898d940066b190c336d4f09d976f0378a463aae309b6f5741f553cedf7d
7
- data.tar.gz: 5db7693f4a85cd044586dbf43569063dc0050275742b58ebe58f21ea46f7e2e9eddebd25511e19812e495c3e57094abd04abbc6806cf21c59af450ca030fc301