indico 0.1.0 → 0.1.2
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.
- data/README.md +2 -0
- data/indico.gemspec +2 -2
- data/lib/indico/version.rb +1 -1
- data/lib/indico.rb +6 -0
- data/spec/indico_spec.rb +42 -0
- metadata +4 -2
data/README.md
CHANGED
data/indico.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'indico/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "indico"
|
8
8
|
spec.version = Indico::VERSION
|
9
|
-
spec.authors = ["Amit Ambardekar"]
|
10
|
-
spec.email = ["amitamb@gmail.com"]
|
9
|
+
spec.authors = ["Slater Victoroff", "Amit Ambardekar"]
|
10
|
+
spec.email = ["slater@indico.io", "amitamb@gmail.com"]
|
11
11
|
spec.summary = %q{A simple Ruby Wrapper for the indico set of APIs.}
|
12
12
|
spec.description = %q{A simple Ruby Wrapper for the indico set of APIs.}
|
13
13
|
spec.homepage = "https://github.com/IndicoDataSolutions/IndicoIo-ruby"
|
data/lib/indico/version.rb
CHANGED
data/lib/indico.rb
CHANGED
@@ -24,6 +24,12 @@ module Indico
|
|
24
24
|
self.posneg(*args)
|
25
25
|
end
|
26
26
|
|
27
|
+
def self.language(test_text)
|
28
|
+
data_dict = JSON.dump({ text: test_text })
|
29
|
+
response = make_request(base_url("language"), data_dict, HEADERS)
|
30
|
+
JSON.parse(response.body)
|
31
|
+
end
|
32
|
+
|
27
33
|
def self.fer(face)
|
28
34
|
data_dict = JSON.dump({ face: face})
|
29
35
|
response = make_request(base_url("fer"), data_dict, HEADERS)
|
data/spec/indico_spec.rb
CHANGED
@@ -17,6 +17,48 @@ describe Indico do
|
|
17
17
|
expect(Set.new(response.keys)).to eql(expected_keys)
|
18
18
|
end
|
19
19
|
|
20
|
+
it "should tag text with correct language tags" do
|
21
|
+
expected_keys = Set.new([
|
22
|
+
'English',
|
23
|
+
'Spanish',
|
24
|
+
'Tagalog',
|
25
|
+
'Esperanto',
|
26
|
+
'French',
|
27
|
+
'Chinese',
|
28
|
+
'French',
|
29
|
+
'Bulgarian',
|
30
|
+
'Latin',
|
31
|
+
'Slovak',
|
32
|
+
'Hebrew',
|
33
|
+
'Russian',
|
34
|
+
'German',
|
35
|
+
'Japanese',
|
36
|
+
'Korean',
|
37
|
+
'Portuguese',
|
38
|
+
'Italian',
|
39
|
+
'Polish',
|
40
|
+
'Turkish',
|
41
|
+
'Dutch',
|
42
|
+
'Arabic',
|
43
|
+
'Persian (Farsi)',
|
44
|
+
'Czech',
|
45
|
+
'Swedish',
|
46
|
+
'Indonesian',
|
47
|
+
'Vietnamese',
|
48
|
+
'Romanian',
|
49
|
+
'Greek',
|
50
|
+
'Danish',
|
51
|
+
'Hungarian',
|
52
|
+
'Thai',
|
53
|
+
'Finnish',
|
54
|
+
'Norwegian',
|
55
|
+
'Lithuanian'
|
56
|
+
])
|
57
|
+
response = Indico.language('Quis custodiet ipsos custodes')
|
58
|
+
|
59
|
+
expect(Set.new(response.keys)).to eql(expected_keys)
|
60
|
+
end
|
61
|
+
|
20
62
|
it "should tag face with correct faciel expression" do
|
21
63
|
expected_keys = Set.new(["Angry", "Sad", "Neutral", "Surprise", "Fear", "Happy"])
|
22
64
|
test_face = 0.step(50, 50.0/(48.0*48.0)).to_a[0..-2].each_slice(48).to_a
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
+
- Slater Victoroff
|
8
9
|
- Amit Ambardekar
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2014-
|
13
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bundler
|
@@ -61,6 +62,7 @@ dependencies:
|
|
61
62
|
version: '0'
|
62
63
|
description: A simple Ruby Wrapper for the indico set of APIs.
|
63
64
|
email:
|
65
|
+
- slater@indico.io
|
64
66
|
- amitamb@gmail.com
|
65
67
|
executables: []
|
66
68
|
extensions: []
|