paralleldots 1.0.13 → 1.0.14

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/paralleldots.rb +12 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9ce6245e6e72fe6cbe82a7cc3e1e8d633c121b8
4
- data.tar.gz: f8945819888ecfdf1aa4f0f691e91a123d9bb42b
3
+ metadata.gz: 1602685466929704b6c8cd10ef8902b39429889c
4
+ data.tar.gz: f9f1cf3c5c97a1a6fd8aa471b2b28b6ef9410d39
5
5
  SHA512:
6
- metadata.gz: c786fc4ab8707f54f01688fb0306028ad25c2b72ed0f00e16c2b8d962c876ab746cef27615a3aecc9a4f4973ed7ad658d5158800a999f4b0aed91cfa476facb1
7
- data.tar.gz: 6c9888f670fca6837541599f1c8a4918413b7681d9434b5045dd7a93e19f0a3fb2b9649d0c9b38b22a9c8425b88aa849f1eb51a990588ed1f7a23bbc7b15e370
6
+ metadata.gz: daae5173f10a8064e3f596dc017aa6bb1327dc86366b95525511b0623ed3e02f6dc75c18b50f6e531bfabf9a265b918d80a90d4cc079f9108825240454eaf513
7
+ data.tar.gz: c7cc85a015bd1b69fc664ac8eb0377f8b02c916a732f50ec564c08904afe20594a1e444d6faf3a74cc02df176967b3a36cc8e7dc996e0bd4ef5b9c0ca2c5b25b
@@ -139,6 +139,18 @@ def sentiment_social( text )
139
139
  return response
140
140
  end
141
141
 
142
+ def custom_classifier( text, id )
143
+ api_key = get_api_key
144
+ valid = check( api_key, text )
145
+ if valid != true then
146
+ return valid
147
+ end
148
+ response = RestClient.post "http://apis.paralleldots.com/v2/custom_classifier", { api_key: api_key, text: text, id: id }
149
+ response = JSON.parse( response )
150
+ response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
151
+ return response
152
+ end
153
+
142
154
  def usage()
143
155
  api_key = get_api_key
144
156
  if api_key == nil or api_key == "" then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paralleldots
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meghdeep Ray