a3rt_client 0.1.2 → 0.1.3
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/README.md +21 -0
- data/lib/a3rt_client/a3rt_client.rb +24 -2
- data/lib/a3rt_client/version.rb +1 -1
- 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: 388db45c81023a0d2529a47b71e1379692ee33566da8c9db7ca001a0a0f1ac58
|
4
|
+
data.tar.gz: 75c414fbf2a0f8f7f42f46980554b41fe302fad07371ac4bda7e46c72d5cb476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb88c0398b39e2f888e088c795b06db75a26b1caeabc1272d21eb22cca12e81023a6a37be8d39aca71594072e1fa7af9a546111a0daaea2aa597b3e6c58968f2
|
7
|
+
data.tar.gz: 1af1ac3c5cdfa98c63fac3a3acfdcac057b48d250ba8da74486f57f0f378faf9330327bd3070cdd0a655983e48b9651ed73610dde8cc27df03fddf0912d1fdb9
|
data/README.md
CHANGED
@@ -42,6 +42,27 @@ p resonse
|
|
42
42
|
# => {"status"=>0, "message"=>"ok", "suggestion"=>["を飲んでいます。", "の下にいる象たちの顔が見えています。", "の中に入れられています。"]}
|
43
43
|
```
|
44
44
|
|
45
|
+
### Text Summarization
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
require "a3rt_client"
|
49
|
+
p A3rt::Client.text_summarization(apikey: apiKey, sentences: "センテンス1。センテンス2。センテンス3。")
|
50
|
+
# => {"message"=>"Summarization is completed", "status"=>0, "summary"=>["センテンス1"]}
|
51
|
+
```
|
52
|
+
|
53
|
+
### Proofreading API
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
require "a3rt_client"
|
57
|
+
p A3rt::Client.proofreading(apikey: apikey, sentence: "システムの企画から開発・運用まで幅広く関われます。")
|
58
|
+
# => {"resultID"=>"4e9ae6450fe2", "status"=>0, "message"=>"ok", "inputSentence"=>"システムの企画から開発・運用まで幅広く関われます。", "normalizedSentence"=>"システムの企画から開発・運用まで幅広く関われます。", "checkedSentence"=>"システムの企画から開発・運用まで幅広く関われます。"}
|
59
|
+
```
|
60
|
+
|
61
|
+
### Image Search
|
62
|
+
```ruby
|
63
|
+
require "a3rt_client"
|
64
|
+
p A3rt::Client.text_summarization(apikey: apikey, query: "馬に乗った男性")
|
65
|
+
```
|
45
66
|
## Development
|
46
67
|
|
47
68
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -11,11 +11,31 @@ module A3rt
|
|
11
11
|
http_request("/talk/v1/smalltalk", :post, params)
|
12
12
|
end
|
13
13
|
|
14
|
-
def text_suggest(apikey: , previous_description
|
14
|
+
def text_suggest(apikey: , previous_description: , callback: nil, style: nil, separation: nil)
|
15
15
|
params = make_params(apikey: apikey, previous_description: previous_description, callback: callback, style: style, separation: separation)
|
16
16
|
http_request("/text_suggest/v2/predict", :get, params)
|
17
17
|
end
|
18
18
|
|
19
|
+
def text_summarization(apikey: , sentences: , linenumber: nil, separation: nil)
|
20
|
+
params = make_params(apikey: apikey, sentences: sentences, linenumber: linenumber, separation: separation)
|
21
|
+
http_request("/text_summarization/v1", :post, params)
|
22
|
+
end
|
23
|
+
|
24
|
+
def image_search(apikey: , query: )
|
25
|
+
params = make_params(apikey: apikey, query: query)
|
26
|
+
http_request("/image_search/v1/search_by_text", :get, params)
|
27
|
+
end
|
28
|
+
|
29
|
+
def proofreading(apikey: , sentence: , callback: nil, sensitivity: nil)
|
30
|
+
params = make_params(apikey: apikey, sentence: sentence, callback: callback, sensitivity: sensitivity)
|
31
|
+
http_request("/proofreading/v2/typo", :get, params)
|
32
|
+
end
|
33
|
+
|
34
|
+
def sql_suggest(apikey: , model_id: , text: )
|
35
|
+
params = make_params(apikey: apikey, model_id: model_id, text: text)
|
36
|
+
http_request("/sql_suggest/v1/predict", :get, params)
|
37
|
+
end
|
38
|
+
|
19
39
|
private
|
20
40
|
|
21
41
|
def make_params(**params)
|
@@ -29,4 +49,6 @@ module A3rt
|
|
29
49
|
end
|
30
50
|
end
|
31
51
|
end
|
32
|
-
end
|
52
|
+
end
|
53
|
+
# A3rt::Client.text_summarization(apiKey: "DZZyDsXDVyWJFnOYphtldzuX6tz0u2ln", sentences: "こんにちわ。こんにちわ。")
|
54
|
+
# A3rt::Client.image_search(apikey: "DZZ9TIu4JvnB87Pv2LHvW6Z3n3KAP9gR", query: "動物")
|
data/lib/a3rt_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a3rt_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken yamamoto(山本 憲)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|