nlpcloud 1.0.17 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nlpcloud.rb +4 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba0ea165110cdb347d71a03eecfee3f90683d64526af1f26ee2b01a90818fd09
4
- data.tar.gz: daf9745041d2cc720d5df0ef37275f44b320f8a760f985d264ae8173f287c150
3
+ metadata.gz: 0ce2d6801c7755ddca5273e89a899ab4fc5980f59046b29e48f2b5fbcdd2c735
4
+ data.tar.gz: c4f466132c5378e2009d3fe5f16abd4d5fb50b7d60ae3993f1bc8986417e88f0
5
5
  SHA512:
6
- metadata.gz: 51c84014d9fbf0816ee3727ff013a809aa104be22cb79463a47b0ad2cdfd7b1458e2068ff92c153758e666fd2f349d1e99ba70170f3c8b3d60882153d1d320d0
7
- data.tar.gz: d86e7c59c918f9c1d95b36e696eac83a1627096fd0a09c795802092c4f83ebfbe5a402fd482b98c63a8fefb63a02cd76ae1feb2fa5b2ead83bac5ed2cac1e656
6
+ metadata.gz: e174bf062d7e069ae5a51dc264b7fff737e10ef49a25047221659e18baa75301fb60e8b28ca5fc63d4dcf6db9fd64368a2e7c8b20bee5e0e1912e2fbbd36ac9d
7
+ data.tar.gz: 6d84bd69c13b9fa22a4f2f7fb5dbf0f76efb067a477f5546b126b5f825d655dae64b351ff8424b68bcd2f38c567335e15e4268b87b7ea2fbb95b37735d4d8070
data/lib/nlpcloud.rb CHANGED
@@ -35,7 +35,7 @@ module NLPCloud
35
35
  JSON.parse(response.body)
36
36
  end
37
37
 
38
- def classification(text, labels, multi_class: nil)
38
+ def classification(text, labels: nil, multi_class: nil)
39
39
  payload = {
40
40
  'text' => text,
41
41
  'labels' => labels,
@@ -81,10 +81,10 @@ module NLPCloud
81
81
  JSON.parse(response.body)
82
82
  end
83
83
 
84
- def question(context, question)
84
+ def question(question, context: nil)
85
85
  payload = {
86
- 'context' => context,
87
- 'question' => question
86
+ 'question' => question,
87
+ 'context' => context
88
88
  }
89
89
  response = RestClient.post("#{@root_url}/question", payload.to_json, @headers)
90
90
  JSON.parse(response.body)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nlpcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Salinas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'NLP Cloud serves high performance pre-trained or custom models for NER,
14
14
  sentiment-analysis, classification, summarization, text generation, question answering,