nlpcloud 1.0.22 → 1.0.23
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.
- checksums.yaml +4 -4
- data/lib/nlpcloud.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f076500f18c31ff51717007432a3d67c991803991a048af82086f94167442174
|
4
|
+
data.tar.gz: 3add87cd8b074c486dde61676376243c1bc4e08b8d2eb711ffdc65d292fa1844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02e26507bee02346f3ebd871ba2e0daaa3f1862a4a20ee03c97815841b0aa3604ae61ed512ba11adc2cd6f7adc14a0e932553fc8699bcb3ef66811508cf387a6
|
7
|
+
data.tar.gz: 9482ba800cd69ce7158d32dea7b6ff5689b2e776235d8ec790a329ef9cb1054fba16abbd8b9fe24a3886824d41da32e41af3d04752ea18b093d941bedd00fcd4
|
data/lib/nlpcloud.rb
CHANGED
@@ -203,9 +203,11 @@ module NLPCloud
|
|
203
203
|
JSON.parse(response.body)
|
204
204
|
end
|
205
205
|
|
206
|
-
def translation(text)
|
206
|
+
def translation(text, source, target)
|
207
207
|
payload = {
|
208
|
-
'text' => text
|
208
|
+
'text' => text,
|
209
|
+
'source' => source,
|
210
|
+
'target' => target
|
209
211
|
}
|
210
212
|
response = RestClient.post("#{@root_url}/translation", payload.to_json, @headers)
|
211
213
|
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.
|
4
|
+
version: 1.0.23
|
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-
|
11
|
+
date: 2022-06-01 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, paraphrasing, grammar and spelling
|