nlpcloud 1.0.29 → 1.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nlpcloud.rb +11 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb4e5c8f1aa77a198f1d1fadda322c9e8a9dc66c529b101a33c01e90ebc5699c
|
4
|
+
data.tar.gz: 910f32909dc6765d5bbb50f060562feb9d8e0f1f32f52220e2eeb769852ba683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec46f16688f748780c891ca3b1f3410b388e8bd111a84162d6f22452b596bf222aeb8b066ca3063dc990759a7069c04102c692694db9d92f14c662e882fad79f
|
7
|
+
data.tar.gz: 28bb026f06a86c9513baea2179673d01a5a66877eded008de227257a9faf4d9cee2ecac42b5ef66e00fad7a60bac8fb51d54634d8e2966fd518b6dbd23fe0ede
|
data/lib/nlpcloud.rb
CHANGED
@@ -198,6 +198,14 @@ module NLPCloud
|
|
198
198
|
JSON.parse(response.body)
|
199
199
|
end
|
200
200
|
|
201
|
+
def semantic_search(sentences)
|
202
|
+
payload = {
|
203
|
+
'text' => text
|
204
|
+
}
|
205
|
+
response = RestClient.post("#{@root_url}/semantic_search", payload.to_json, @headers)
|
206
|
+
JSON.parse(response.body)
|
207
|
+
end
|
208
|
+
|
201
209
|
def semantic_similarity(sentences)
|
202
210
|
payload = {
|
203
211
|
'sentences' => sentences
|
@@ -222,9 +230,10 @@ module NLPCloud
|
|
222
230
|
JSON.parse(response.body)
|
223
231
|
end
|
224
232
|
|
225
|
-
def summarization(text)
|
233
|
+
def summarization(text, size: nil)
|
226
234
|
payload = {
|
227
|
-
'text' => text
|
235
|
+
'text' => text,
|
236
|
+
'size' => size
|
228
237
|
}
|
229
238
|
response = RestClient.post("#{@root_url}/summarization", payload.to_json, @headers)
|
230
239
|
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.31
|
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-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -29,9 +29,9 @@ description: 'NLP Cloud serves high performance pre-trained or custom models for
|
|
29
29
|
correction, keywords and keyphrases extraction, chatbot, product description and
|
30
30
|
ad generation, intent classification, text generation, image generation, code generation,
|
31
31
|
blog post generation, question answering, automatic speech recognition, machine
|
32
|
-
translation, language detection, semantic similarity, tokenization,
|
33
|
-
embeddings, and dependency parsing. It is ready for production, served
|
34
|
-
REST API. This is the Ruby client for the API. More details here: https://nlpcloud.io.
|
32
|
+
translation, language detection, semantic search, semantic similarity, tokenization,
|
33
|
+
POS tagging, embeddings, and dependency parsing. It is ready for production, served
|
34
|
+
through a REST API. This is the Ruby client for the API. More details here: https://nlpcloud.io.
|
35
35
|
Documentation: https://docs.nlpcloud.io.'
|
36
36
|
email: all@juliensalinas.com
|
37
37
|
executables: []
|