nlu_adapter 0.1.0 → 0.1.1
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +4 -4
- data/docs/dialogflow.md +14 -1
- data/docs/lex.md +14 -2
- data/lib/nlu_adapter/version.rb +1 -1
- data/nlu_adapter.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87e9296aec7759999ae9054e1779e86c7d898d5e9e023b898850573375dfa94a
|
4
|
+
data.tar.gz: 9d8ec87471a9c9bbefd642397f1c0b70bd9fc8d79e13933a54365f936b595357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3de33ce91f4a2459b840412ef606fa0b1bf1356c55b43b1f58c66ec51a303ed8deac5bb7b19602185b296681eb545717bc90f618b9cbb39c0b245414eef3d50
|
7
|
+
data.tar.gz: 18931d79ebbf6edbab6c4ae223f42688e4deb701edc0b3db75d2a2b4e6cf26fcee8961cf30feb7765d34306a3d8b4a17ea958b04ed065d15e525545f50270ae0
|
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nlu_adapter (0.1.
|
4
|
+
nlu_adapter (0.1.1)
|
5
5
|
aws-sdk-lex (= 1.9)
|
6
6
|
aws-sdk-lexmodelbuildingservice (= 1.12)
|
7
7
|
google-cloud-dialogflow (= 0.2.3)
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
aws-sigv4 (~> 1.0)
|
27
27
|
aws-sigv4 (1.0.3)
|
28
28
|
diff-lcs (1.3)
|
29
|
-
faraday (0.15.
|
29
|
+
faraday (0.15.4)
|
30
30
|
multipart-post (>= 1.2, < 3)
|
31
31
|
google-cloud-dialogflow (0.2.3)
|
32
32
|
google-gax (~> 1.3)
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
googleauth (~> 0.6.2)
|
37
37
|
grpc (>= 1.7.2, < 2.0)
|
38
38
|
rly (~> 0.2.3)
|
39
|
-
google-protobuf (3.6.1
|
39
|
+
google-protobuf (3.6.1)
|
40
40
|
googleapis-common-protos (1.3.7)
|
41
41
|
google-protobuf (~> 3.0)
|
42
42
|
googleapis-common-protos-types (~> 1.0)
|
@@ -50,7 +50,7 @@ GEM
|
|
50
50
|
multi_json (~> 1.11)
|
51
51
|
os (>= 0.9, < 2.0)
|
52
52
|
signet (~> 0.7)
|
53
|
-
grpc (1.
|
53
|
+
grpc (1.17.1)
|
54
54
|
google-protobuf (~> 3.1)
|
55
55
|
googleapis-common-protos-types (~> 1.0.0)
|
56
56
|
jmespath (1.4.0)
|
data/docs/dialogflow.md
CHANGED
@@ -11,7 +11,6 @@ Adapter for Google Dialogflow
|
|
11
11
|
```ruby
|
12
12
|
require 'nlu_adapter'
|
13
13
|
|
14
|
-
|
15
14
|
d = NluAdapter.new(:Dialogflow, {project_id: "test-1-NNNN", session_id: 'SESSION1'})
|
16
15
|
|
17
16
|
puts d.parse('I want to book a hotel')
|
@@ -34,3 +33,17 @@ d.create_intent(i)
|
|
34
33
|
3. Create an intent collection
|
35
34
|
|
36
35
|
Create an Agent from Dialogflow console.
|
36
|
+
|
37
|
+
## Running examples
|
38
|
+
```bash
|
39
|
+
$ cat test-df-1.rb
|
40
|
+
require 'nlu_adapter'
|
41
|
+
|
42
|
+
d = NluAdapter.new(:Dialogflow, {project_id: "test-1-NNNN", session_id: 'SESSION1'})
|
43
|
+
|
44
|
+
puts d.parse('I want to book a hotel')
|
45
|
+
|
46
|
+
$ GOOGLE_APPLICATION_CREDENTIALS='./test-1-NNNN.json' ruby ./test-df-1.rb
|
47
|
+
{:intent_name=>"BookHotel"}
|
48
|
+
|
49
|
+
```
|
data/docs/lex.md
CHANGED
@@ -4,14 +4,12 @@ Adapter for Aws Lex
|
|
4
4
|
|
5
5
|
## Setup
|
6
6
|
|
7
|
-
|
8
7
|
## Examples
|
9
8
|
|
10
9
|
1. Parse a text and identify intent from an existing Lex bot
|
11
10
|
```ruby
|
12
11
|
require 'nlu_adapter'
|
13
12
|
|
14
|
-
|
15
13
|
l = NluAdapter.new(:Lex, {bot_name: "BotName", bot_alias: "BotAlias", user_id: "user-1"})
|
16
14
|
|
17
15
|
puts l.parse('I want to book a hotel')
|
@@ -45,3 +43,17 @@ ic = l.new_intent_collection('BotName', intents)
|
|
45
43
|
l.create_intent_collection(ic)
|
46
44
|
|
47
45
|
```
|
46
|
+
|
47
|
+
## Running examples
|
48
|
+
```bash
|
49
|
+
$ cat test-lex-1.rb
|
50
|
+
require 'nlu_adapter'
|
51
|
+
|
52
|
+
l = NluAdapter.new(:Lex, {bot_name: "BotName", bot_alias: "BotAlias", user_id: "user-1"})
|
53
|
+
|
54
|
+
puts l.parse('I want to book a hotel')
|
55
|
+
|
56
|
+
$ AWS_REGION='us-east-1' AWS_ACCESS_KEY_ID='XXX' AWS_SECRET_ACCESS_KEY='YYY' ruby ./test-lex-1.rb
|
57
|
+
{:intent_name=>"BookHotel"}
|
58
|
+
|
59
|
+
```
|
data/lib/nlu_adapter/version.rb
CHANGED
data/nlu_adapter.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
23
23
|
spec.metadata["source_code_uri"] = "https://github.com/technopreneurG/nlu_adapter_ruby"
|
24
|
-
spec.metadata["changelog_uri"] = "https://github.com/technopreneurG/nlu_adapter_ruby/CHANGELOG.md"
|
24
|
+
spec.metadata["changelog_uri"] = "https://github.com/technopreneurG/nlu_adapter_ruby/blob/master/CHANGELOG.md"
|
25
25
|
else
|
26
26
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
27
27
|
"public gem pushes."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nlu_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Girish
|
@@ -103,6 +103,7 @@ extensions: []
|
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
105
|
- ".rspec"
|
106
|
+
- CHANGELOG.md
|
106
107
|
- CODE_OF_CONDUCT.md
|
107
108
|
- Dockerfile
|
108
109
|
- Gemfile
|
@@ -128,7 +129,7 @@ metadata:
|
|
128
129
|
allowed_push_host: https://rubygems.org
|
129
130
|
homepage_uri: https://rubygems.org/gems/nlu_adapter
|
130
131
|
source_code_uri: https://github.com/technopreneurG/nlu_adapter_ruby
|
131
|
-
changelog_uri: https://github.com/technopreneurG/nlu_adapter_ruby/CHANGELOG.md
|
132
|
+
changelog_uri: https://github.com/technopreneurG/nlu_adapter_ruby/blob/master/CHANGELOG.md
|
132
133
|
post_install_message:
|
133
134
|
rdoc_options: []
|
134
135
|
require_paths:
|