nlpcloud 1.0.17 → 1.0.20
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 +15 -6
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb4f92a6a1a8bd0bb34711c966b14e794ab58e5d2fd4d6971c12e80906fc511b
|
4
|
+
data.tar.gz: 3834f4b08fafa823d89c64a375ad5dc5c6321dcb003dc481ea4c842878d14a2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 060e2f7e75120e8c7efa4eb7a6b7412c0fff23cfab0adbe79e6b74d9a6faa289838a93f56d31349bee2b38909458528c5cc938a2c40b8fa971105e5b63ab849f
|
7
|
+
data.tar.gz: aa01522b0580040c7aeaa7718a75c1d8f44a18a563424c725e478db97224a6fbbacda278ee155939714f2d7e51d1523b6ee9df16b0d9646222997c121b425e7b
|
data/lib/nlpcloud.rb
CHANGED
@@ -27,15 +27,16 @@ module NLPCloud
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def entities(text)
|
30
|
+
def entities(text, searched_entity: nil)
|
31
31
|
payload = {
|
32
|
-
'text' => text
|
32
|
+
'text' => text,
|
33
|
+
'searched_entity' => searched_entity
|
33
34
|
}
|
34
35
|
response = RestClient.post("#{@root_url}/entities", payload.to_json, @headers)
|
35
36
|
JSON.parse(response.body)
|
36
37
|
end
|
37
38
|
|
38
|
-
def classification(text, labels, multi_class: nil)
|
39
|
+
def classification(text, labels: nil, multi_class: nil)
|
39
40
|
payload = {
|
40
41
|
'text' => text,
|
41
42
|
'labels' => labels,
|
@@ -81,10 +82,10 @@ module NLPCloud
|
|
81
82
|
JSON.parse(response.body)
|
82
83
|
end
|
83
84
|
|
84
|
-
def question(
|
85
|
+
def question(question, context: nil)
|
85
86
|
payload = {
|
86
|
-
'
|
87
|
-
'
|
87
|
+
'question' => question,
|
88
|
+
'context' => context
|
88
89
|
}
|
89
90
|
response = RestClient.post("#{@root_url}/question", payload.to_json, @headers)
|
90
91
|
JSON.parse(response.body)
|
@@ -98,6 +99,14 @@ module NLPCloud
|
|
98
99
|
JSON.parse(response.body)
|
99
100
|
end
|
100
101
|
|
102
|
+
def paraphrasing(text)
|
103
|
+
payload = {
|
104
|
+
'text' => text
|
105
|
+
}
|
106
|
+
response = RestClient.post("#{@root_url}/paraphrasing", payload.to_json, @headers)
|
107
|
+
JSON.parse(response.body)
|
108
|
+
end
|
109
|
+
|
101
110
|
def translation(text)
|
102
111
|
payload = {
|
103
112
|
'text' => text
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
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.20
|
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-
|
11
|
+
date: 2022-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'NLP Cloud serves high performance pre-trained or custom models for NER,
|
14
|
-
sentiment-analysis, classification, summarization, text generation,
|
15
|
-
machine translation, language detection, semantic similarity,
|
16
|
-
tagging, embeddings, and dependency parsing. It is ready for production,
|
17
|
-
through a REST API. This is the Ruby client for the API. More details here:
|
18
|
-
Documentation: https://docs.nlpcloud.io.'
|
14
|
+
sentiment-analysis, classification, summarization, paraphrasing, text generation,
|
15
|
+
question answering, machine translation, language detection, semantic similarity,
|
16
|
+
tokenization, POS tagging, embeddings, and dependency parsing. It is ready for production,
|
17
|
+
served through a REST API. This is the Ruby client for the API. More details here:
|
18
|
+
https://nlpcloud.io. Documentation: https://docs.nlpcloud.io.'
|
19
19
|
email: all@juliensalinas.com
|
20
20
|
executables: []
|
21
21
|
extensions: []
|