nlpcloud 1.0.8 → 1.0.9

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 +8 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10c0a4d3c5d521504f79e2f5fff0299d84555508e86257a7b110a3cb6d4483ae
4
- data.tar.gz: 64d3bee78530167352fc1b91c5d617844e44b237d714ca52c53119c0f7e8123c
3
+ metadata.gz: ab6ad951a1b80b36984a5b46365fe4ee273aa9d8bfc488b13007649d322860fb
4
+ data.tar.gz: 3f03bc5ec2be3f45f8e84271ba2ae506804ad9a038f6778f22bf372009429b6b
5
5
  SHA512:
6
- metadata.gz: 4e23aae57e6591d27673d8a20eec8f9b47149a3c1d24448eac02d5892b64fefa0a105d664da04150548b10033c57c3eabc4f5db9b5a730553b6d72525c314fc0
7
- data.tar.gz: 34de7fba883dbc73ac045b227ff227d917458dc9190ca77ca259e6232e803ef181b0a640c463e1820eda0534db74b8de2893ec7c353bebe5c92a2293bca60405
6
+ metadata.gz: bd06ca4a59eeeea5a8b00355d0d6a986505c4c17b666d535c17854ce10fa9b3f7f01480cc3efd1b2c7f29a9fe67005e022a6c37b2dbcbada289dec05f6fc3538
7
+ data.tar.gz: b6552e52e42447424c88573caca8e4d9bdee93c4ec2f5ab5e180bf1dfc3da2d71bd4a187aa41a2bf34af02a9c9fa8dcb61887bdc7ee916cb5700120252341ca6
data/lib/nlpcloud.rb CHANGED
@@ -59,6 +59,14 @@ module NLPCloud
59
59
  JSON.parse(response.body)
60
60
  end
61
61
 
62
+ def translation(text)
63
+ payload = {
64
+ 'text' => text
65
+ }
66
+ response = RestClient.post("#{@root_url}/translation", payload.to_json, @headers)
67
+ JSON.parse(response.body)
68
+ end
69
+
62
70
  def dependencies(text)
63
71
  payload = {
64
72
  'text' => text
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.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Salinas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-26 00:00:00.000000000 Z
11
+ date: 2021-04-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Ruby client for the NLP Cloud API. NLP Cloud serves high performance
14
14
  pre-trained or custom models for NER, sentiment-analysis, classification, summarization,
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.1.2
45
+ rubygems_version: 3.1.4
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Ruby client for the NLP Cloud API