nlpcloud 1.0.36 → 1.0.38
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 +6 -4
- 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: bb244750c675028af5479e001343ae06f48adef84c15e6ac16987aac07e74f60
|
|
4
|
+
data.tar.gz: ece3a2bc871c7352f2e792ebba49aec2a3eb39d53ac342460eb078fe7ff14fe8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 653ff47c033a35a665635ad1ab1199681493b5a231111661e570e5702608a582afa7ef32a02b10baf2d8fc185f1947a98dc8a74446056759cdf0a81487f7caea
|
|
7
|
+
data.tar.gz: 41231b42f394af13662a354941892e7b7a1cabb69d005536481f6fe4a5fda707e49ec9b17e783db258fdd22657994ebf493ef654733314d8dfe56add3bd1d6d4
|
data/lib/nlpcloud.rb
CHANGED
|
@@ -54,10 +54,11 @@ module NLPCloud
|
|
|
54
54
|
JSON.parse(response.body)
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
def asr(url: nil, encoded_file: nil)
|
|
57
|
+
def asr(url: nil, encoded_file: nil, input_language: nil)
|
|
58
58
|
payload = {
|
|
59
59
|
'url' => url,
|
|
60
|
-
'encoded_file' => encoded_file
|
|
60
|
+
'encoded_file' => encoded_file,
|
|
61
|
+
'input_language' => input_language
|
|
61
62
|
}
|
|
62
63
|
response = RestClient.post("#{@root_url}/asr", payload.to_json, @headers)
|
|
63
64
|
JSON.parse(response.body)
|
|
@@ -211,9 +212,10 @@ module NLPCloud
|
|
|
211
212
|
JSON.parse(response.body)
|
|
212
213
|
end
|
|
213
214
|
|
|
214
|
-
def semantic_search(
|
|
215
|
+
def semantic_search(text, num_results: nil)
|
|
215
216
|
payload = {
|
|
216
|
-
'text' => text
|
|
217
|
+
'text' => text,
|
|
218
|
+
'num_results' => num_results
|
|
217
219
|
}
|
|
218
220
|
response = RestClient.post("#{@root_url}/semantic_search", payload.to_json, @headers)
|
|
219
221
|
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.38
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julien Salinas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|