paralleldots 3.2.5 → 3.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +5 -5
  2. data/lib/config.rb +1 -1
  3. data/lib/paralleldots.rb +67 -1
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 34653b2902e9f75f36fe6a5df46866cd1f47a782525d27f2a05af32dd0646b82
4
- data.tar.gz: 6ab859847bb9937c126d10dce7b0a1488379cee4432b18cbb2334c3f1b6269bc
2
+ SHA1:
3
+ metadata.gz: 06ddccc169800221da37d76cd94a96f30dc366a0
4
+ data.tar.gz: ea9fa80fc28a5aca8697c4b0bd3c89a17575d55c
5
5
  SHA512:
6
- metadata.gz: d1038393907007baff159490685ebe241e3c6fbdd3f1a0280a6c7ea7ee9b9b9b9419c41be7062567fdac65c098348e151e8c03717eeecb31555559ba034b5a43
7
- data.tar.gz: 3aa3754944c0baa1525faf6db1583ed41182b6e8580f7fbe540e4edbdc0247882ad15a48ff52b420c80eebed04177f9e616764c69df85b1b7b48dff715e92da4
6
+ metadata.gz: 01b27059643885d9852f92ebcccfe64b51f110fa6def8260fd54646138e02b8efa4272580018caafbeb118bda115aa5aafd87a716f482facd908f15a1a3ba251
7
+ data.tar.gz: c9c1d14c232da29e6369af05880755c1c676757a09ba2a45698abdb9328a17f51f861aef2c507978215d9f722df10fe4439ae190bb521e15c9847a8e5b936635
@@ -18,4 +18,4 @@ def get_api_key
18
18
  puts "No API Key Found."
19
19
  return
20
20
  end
21
- end
21
+ end
@@ -159,4 +159,70 @@ def usage()
159
159
  response = RestClient.post "https://apis.paralleldots.com/usage", { api_key: api_key }
160
160
  response = JSON.parse( response )
161
161
  return response
162
- end
162
+ end
163
+
164
+
165
+ def batch_intent( data )
166
+ api_key = get_api_key()
167
+ response = RestClient.post "https://apis.paralleldots.com/v3/intent_batch", { "text": data.to_json, "api_key": api_key }
168
+ response = JSON.parse( response )
169
+ return response
170
+ end
171
+
172
+ def batch_abuse( data )
173
+ api_key = get_api_key()
174
+ response = RestClient.post "https://apis.paralleldots.com/v3/abuse_batch", { "text": data.to_json, "api_key": api_key }
175
+ response = JSON.parse( response )
176
+ return response
177
+ end
178
+
179
+ def batch_ner( data )
180
+ api_key = get_api_key()
181
+ response = RestClient.post "https://apis.paralleldots.com/v3/ner_batch", { "text": data.to_json, "api_key": api_key }
182
+ response = JSON.parse( response )
183
+ return response
184
+ end
185
+
186
+ def batch_taxonomy( data )
187
+ api_key = get_api_key()
188
+ response = RestClient.post "https://apis.paralleldots.com/v3/taxonomy_batch", { "text": data.to_json, "api_key": api_key }
189
+ response = JSON.parse( response )
190
+ return response
191
+ end
192
+
193
+ def batch_language_detection( data )
194
+ api_key = get_api_key()
195
+ response = RestClient.post "https://apis.paralleldots.com/v3/language_detection_batch", { "text": data.to_json, "api_key": api_key }
196
+ response = JSON.parse( response )
197
+ return response
198
+ end
199
+
200
+ def batch_phrase_extractor( data )
201
+ api_key = get_api_key()
202
+ response = RestClient.post "https://apis.paralleldots.com/v3/phrase_extractor_batch", { "text": data.to_json, "api_key": api_key }
203
+ response = JSON.parse( response )
204
+ return response
205
+ end
206
+
207
+ def batch_keywords( data )
208
+ api_key = get_api_key()
209
+ response = RestClient.post "https://apis.paralleldots.com/v3/keywords_batch", { "text": data.to_json, "api_key": api_key }
210
+ response = JSON.parse( response )
211
+ return response
212
+ end
213
+
214
+ def batch_sentiment( data )
215
+ api_key = get_api_key()
216
+ response = RestClient.post "https://apis.paralleldots.com/v3/sentiment_batch", { "text": data.to_json, "api_key": api_key }
217
+ response = JSON.parse( response )
218
+ return response
219
+ end
220
+
221
+ def batch_emotion( data )
222
+ api_key = get_api_key()
223
+ response = RestClient.post "https://apis.paralleldots.com/v3/emotion_batch", { "text": data.to_json, "api_key": api_key }
224
+ response = JSON.parse( response )
225
+ return response
226
+ end
227
+
228
+ # puts(batch_sentiment(["you are ass hole","people loves fucking weak","sachin is good player"]))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paralleldots
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.8
5
5
  platform: ruby
6
6
  authors:
7
- - Meghdeep Ray
7
+ - Manish Kumar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-10 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -51,7 +51,7 @@ dependencies:
51
51
  - !ruby/object:Gem::Version
52
52
  version: 1.0.8
53
53
  description: Ruby Wrapper for ParallelDots APIs
54
- email: meghdeepr@paralleldots.com
54
+ email: manish@paralleldots.com
55
55
  executables: []
56
56
  extensions: []
57
57
  extra_rdoc_files:
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.7.6
89
+ rubygems_version: 2.5.2.1
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Ruby Wrapper for ParallelDots APIs