stealth-clu 1.0.0
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 +7 -0
- data/.github/workflows/ci.yml +13 -0
- data/.github/workflows/release.yml +29 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +101 -0
- data/LICENSE +21 -0
- data/README.md +2 -0
- data/VERSION +1 -0
- data/lib/stealth/nlp/clu/client.rb +72 -0
- data/lib/stealth/nlp/clu/result.rb +142 -0
- data/lib/stealth/nlp/clu.rb +4 -0
- data/lib/stealth-clu.rb +4 -0
- data/spec/spec_helper.rb +84 -0
- data/stealth-clu.gemspec +24 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e55190619ceeaca0ad9383dfae313f0ac0d0c5c1b0a79b25ee73cae587ed312a
|
4
|
+
data.tar.gz: 592c902a0613c7a16b4ee2ab65191a7239313ea3a663cfbfde6d18aa1a053c20
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a45dc6113768ca60904a4cbc2572eb6a05fa644fb305ce4bd5be307d2549ef773306289176967dc438a6d83bbdb4adae79f8638e34a402fbf3b55c6dae7cd157
|
7
|
+
data.tar.gz: b5ec3ad781eaf03224efe08321cfb39a7575b68a877f9d3d2d7b4ae828d4d26ce86bb39b68cb828f0dc01b7b5664a5e70d46729658f2702eeb88f8509473593a
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Release Gem
|
2
|
+
on:
|
3
|
+
# Triggers the workflow on push with a tag prefixed with v*
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
# Allows you to run this workflow manually from the Actions tab
|
9
|
+
workflow_dispatch:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
release:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 3.1
|
19
|
+
bundler-cache: true
|
20
|
+
- name: Publish gem
|
21
|
+
env:
|
22
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
23
|
+
run: |
|
24
|
+
mkdir -p $HOME/.gem
|
25
|
+
touch $HOME/.gem/credentials
|
26
|
+
chmod 0600 $HOME/.gem/credentials
|
27
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
28
|
+
gem build *.gemspec
|
29
|
+
gem push *.gem
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
stealth-clu (1.0.0)
|
5
|
+
http (~> 4)
|
6
|
+
stealth (>= 2.0.0.beta)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (6.1.7.10)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
17
|
+
addressable (2.8.7)
|
18
|
+
public_suffix (>= 2.0.2, < 7.0)
|
19
|
+
concurrent-ruby (1.3.5)
|
20
|
+
connection_pool (2.5.3)
|
21
|
+
diff-lcs (1.6.2)
|
22
|
+
domain_name (0.6.20240107)
|
23
|
+
ffi (1.17.2)
|
24
|
+
ffi (1.17.2-arm64-darwin)
|
25
|
+
ffi (1.17.2-x86_64-darwin)
|
26
|
+
ffi-compiler (1.3.2)
|
27
|
+
ffi (>= 1.15.5)
|
28
|
+
rake
|
29
|
+
http (4.4.1)
|
30
|
+
addressable (~> 2.3)
|
31
|
+
http-cookie (~> 1.0)
|
32
|
+
http-form_data (~> 2.2)
|
33
|
+
http-parser (~> 1.2.0)
|
34
|
+
http-cookie (1.0.8)
|
35
|
+
domain_name (~> 0.5)
|
36
|
+
http-form_data (2.3.0)
|
37
|
+
http-parser (1.2.3)
|
38
|
+
ffi-compiler (>= 1.0, < 2.0)
|
39
|
+
i18n (1.14.7)
|
40
|
+
concurrent-ruby (~> 1.0)
|
41
|
+
minitest (5.25.5)
|
42
|
+
multi_json (1.15.0)
|
43
|
+
mustermann (2.0.2)
|
44
|
+
ruby2_keywords (~> 0.0.1)
|
45
|
+
nio4r (2.7.4)
|
46
|
+
public_suffix (6.0.2)
|
47
|
+
puma (5.6.9)
|
48
|
+
nio4r (~> 2.0)
|
49
|
+
rack (2.2.14)
|
50
|
+
rack-protection (2.2.4)
|
51
|
+
rack
|
52
|
+
rake (13.2.1)
|
53
|
+
redis (4.8.1)
|
54
|
+
rspec (3.13.0)
|
55
|
+
rspec-core (~> 3.13.0)
|
56
|
+
rspec-expectations (~> 3.13.0)
|
57
|
+
rspec-mocks (~> 3.13.0)
|
58
|
+
rspec-core (3.13.3)
|
59
|
+
rspec-support (~> 3.13.0)
|
60
|
+
rspec-expectations (3.13.4)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.13.0)
|
63
|
+
rspec-mocks (3.13.4)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.13.0)
|
66
|
+
rspec-support (3.13.3)
|
67
|
+
ruby2_keywords (0.0.5)
|
68
|
+
sidekiq (6.5.12)
|
69
|
+
connection_pool (>= 2.2.5, < 3)
|
70
|
+
rack (~> 2.0)
|
71
|
+
redis (>= 4.5.0, < 5)
|
72
|
+
sinatra (2.2.4)
|
73
|
+
mustermann (~> 2.0)
|
74
|
+
rack (~> 2.2)
|
75
|
+
rack-protection (= 2.2.4)
|
76
|
+
tilt (~> 2.0)
|
77
|
+
stealth (2.0.0.beta7)
|
78
|
+
activesupport (~> 6.0)
|
79
|
+
multi_json (~> 1.12)
|
80
|
+
puma (>= 4.2, < 6.0)
|
81
|
+
sidekiq (< 7)
|
82
|
+
sinatra (~> 2.0)
|
83
|
+
thor (~> 1.0)
|
84
|
+
thor (1.3.2)
|
85
|
+
tilt (2.6.0)
|
86
|
+
tzinfo (2.0.6)
|
87
|
+
concurrent-ruby (~> 1.0)
|
88
|
+
zeitwerk (2.6.18)
|
89
|
+
|
90
|
+
PLATFORMS
|
91
|
+
arm64-darwin
|
92
|
+
ruby
|
93
|
+
x86_64-darwin
|
94
|
+
|
95
|
+
DEPENDENCIES
|
96
|
+
rspec (~> 3)
|
97
|
+
stealth (>= 2.0.0.beta)
|
98
|
+
stealth-clu!
|
99
|
+
|
100
|
+
BUNDLED WITH
|
101
|
+
2.6.3
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Stealth
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Stealth
|
4
|
+
module Nlp
|
5
|
+
module Clu
|
6
|
+
class Client < Stealth::Nlp::Client
|
7
|
+
|
8
|
+
def initialize(subscription_key: nil, project_name: nil, deployment_name: nil, endpoint: nil, datetime_ref: nil)
|
9
|
+
begin
|
10
|
+
@subscription_key = subscription_key || Stealth.config.clu.subscription_key
|
11
|
+
@project_name = project_name || Stealth.config.clu.project_name
|
12
|
+
@deployment_name = deployment_name || Stealth.config.clu.deployment_name
|
13
|
+
@endpoint = endpoint || Stealth.config.clu.endpoint
|
14
|
+
@datetime_ref = datetime_ref || Stealth.config.clu.datetime_reference
|
15
|
+
rescue NoMethodError
|
16
|
+
raise(
|
17
|
+
Stealth::Errors::ConfigurationError,
|
18
|
+
'A `clu` configuration key must be specified directly or in `services.yml`'
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def endpoint
|
24
|
+
"https://#{@endpoint}/language/:analyze-conversations?api-version=2023-04-01"
|
25
|
+
end
|
26
|
+
|
27
|
+
def client
|
28
|
+
@client ||= begin
|
29
|
+
headers = {
|
30
|
+
'Content-Type' => 'application/json',
|
31
|
+
'Ocp-Apim-Subscription-Key' => @subscription_key
|
32
|
+
}
|
33
|
+
HTTP.timeout(connect: 15, read: 60).headers(headers)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def understand(query:)
|
38
|
+
body = MultiJson.dump({
|
39
|
+
'kind' => 'Conversation',
|
40
|
+
'analysisInput' => {
|
41
|
+
'conversationItem' => {
|
42
|
+
'participantId' => '1',
|
43
|
+
'id' => '1',
|
44
|
+
'modality' => 'text',
|
45
|
+
'language' => 'en',
|
46
|
+
'text' => query
|
47
|
+
}
|
48
|
+
},
|
49
|
+
'parameters' => {
|
50
|
+
'projectName' => @project_name,
|
51
|
+
'deploymentName' => @deployment_name,
|
52
|
+
'stringIndexType' => 'TextElement_V8',
|
53
|
+
'verbose' => true
|
54
|
+
}
|
55
|
+
})
|
56
|
+
|
57
|
+
Stealth::Logger.l(
|
58
|
+
topic: :nlp,
|
59
|
+
message: 'Performing NLP lookup via Microsoft CLU'
|
60
|
+
)
|
61
|
+
|
62
|
+
result = client.post(endpoint, body: body)
|
63
|
+
Result.new(result: result)
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
ENTITY_TYPES = %i(number currency email percentage phone age
|
72
|
+
url ordinal geo dimension temp datetime)
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Stealth
|
4
|
+
module Nlp
|
5
|
+
module Clu
|
6
|
+
class Result < Stealth::Nlp::Result
|
7
|
+
|
8
|
+
# https://learn.microsoft.com/en-us/azure/ai-services/language-service/conversational-language-understanding/prebuilt-component-reference
|
9
|
+
ENTITY_MAP = {
|
10
|
+
'money' => :currency, 'number' => :number, 'email' => :email,
|
11
|
+
'percentage' => :percentage, 'geographyV2' => :geo, 'age' => :age,
|
12
|
+
'phonenumber' => :phone, 'ordinalV2' => :ordinal, 'url' => :url,
|
13
|
+
'dimension' => :dimension, 'temperature' => :temp, 'keyPhrase' => :key_phrase,
|
14
|
+
'personName' => :name, 'datetimeV2' => :datetime
|
15
|
+
}
|
16
|
+
|
17
|
+
def initialize(result:)
|
18
|
+
@result = result
|
19
|
+
if result.status.success?
|
20
|
+
Stealth::Logger.l(
|
21
|
+
topic: :nlp,
|
22
|
+
message: 'NLP lookup successful'
|
23
|
+
)
|
24
|
+
parsed_result
|
25
|
+
else
|
26
|
+
Stealth::Logger.l(
|
27
|
+
topic: :nlp,
|
28
|
+
message: "NLP lookup FAILED: (#{result.status.code}) #{result.body.to_s}"
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
# https://learn.microsoft.com/en-gb/azure/ai-services/language-service/conversational-language-understanding/how-to/call-api?tabs=REST-APIs#test-the-model
|
35
|
+
# Sample JSON result:
|
36
|
+
# {
|
37
|
+
# "kind": "ConversationResult",
|
38
|
+
# "result": {
|
39
|
+
# "query": "Text1",
|
40
|
+
# "prediction": {
|
41
|
+
# "topIntent": "intent1",
|
42
|
+
# "projectKind": "Conversation",
|
43
|
+
# "intents": [
|
44
|
+
# {
|
45
|
+
# "category": "intent1",
|
46
|
+
# "confidenceScore": 1
|
47
|
+
# },
|
48
|
+
# {
|
49
|
+
# "category": "intent2",
|
50
|
+
# "confidenceScore": 0
|
51
|
+
# },
|
52
|
+
# {
|
53
|
+
# "category": "intent3",
|
54
|
+
# "confidenceScore": 0
|
55
|
+
# }
|
56
|
+
# ],
|
57
|
+
# "entities": [
|
58
|
+
# {
|
59
|
+
# "category": "entity1",
|
60
|
+
# "text": "text1",
|
61
|
+
# "offset": 29,
|
62
|
+
# "length": 12,
|
63
|
+
# "confidenceScore": 1
|
64
|
+
# }
|
65
|
+
# ]
|
66
|
+
# }
|
67
|
+
# }
|
68
|
+
# }
|
69
|
+
|
70
|
+
def parsed_result
|
71
|
+
@parsed_result ||= MultiJson.load(result.body.to_s)
|
72
|
+
end
|
73
|
+
|
74
|
+
def intent
|
75
|
+
top_intent&.to_sym
|
76
|
+
end
|
77
|
+
|
78
|
+
def intent_score
|
79
|
+
parsed_result&.
|
80
|
+
dig('result', 'prediction', 'intents')&.
|
81
|
+
find { |intent| intent['category'] == top_intent }&.
|
82
|
+
dig('confidenceScore')
|
83
|
+
end
|
84
|
+
|
85
|
+
def raw_entities
|
86
|
+
parsed_result&.dig('result', 'prediction', 'entities')
|
87
|
+
end
|
88
|
+
|
89
|
+
# https://learn.microsoft.com/en-us/azure/ai-services/language-service/named-entity-recognition/concepts/entity-resolutions
|
90
|
+
def entities
|
91
|
+
return {} if raw_entities.blank?
|
92
|
+
_entities = {}
|
93
|
+
|
94
|
+
raw_entities.each do |entity|
|
95
|
+
category = entity["category"]
|
96
|
+
mapped_category = ENTITY_MAP[category] || category
|
97
|
+
|
98
|
+
_entities[mapped_category.to_sym] ||= []
|
99
|
+
_entities[mapped_category.to_sym] << entity
|
100
|
+
end
|
101
|
+
|
102
|
+
_entities
|
103
|
+
end
|
104
|
+
|
105
|
+
# def sentiment_score
|
106
|
+
# parsed_result&.dig('prediction', 'sentiment', 'score')
|
107
|
+
# end
|
108
|
+
|
109
|
+
# def sentiment
|
110
|
+
# parsed_result&.dig('prediction', 'sentiment', 'label')&.to_sym
|
111
|
+
# end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
def top_intent
|
116
|
+
@top_intent ||= begin
|
117
|
+
matched_intent = parsed_result&.dig('result', 'prediction', 'topIntent')
|
118
|
+
_intent_score = parsed_result&.
|
119
|
+
dig('result', 'prediction', 'intents')&.
|
120
|
+
find { |intent| intent['category'] == matched_intent }&.
|
121
|
+
dig('confidenceScore')
|
122
|
+
|
123
|
+
if Stealth.config.clu.intent_threshold.is_a?(Numeric)
|
124
|
+
if _intent_score > Stealth.config.clu.intent_threshold
|
125
|
+
matched_intent
|
126
|
+
else
|
127
|
+
Stealth::Logger.l(
|
128
|
+
topic: :nlp,
|
129
|
+
message: "Ignoring intent match. Does not meet threshold (#{Stealth.config.clu.intent_threshold})"
|
130
|
+
)
|
131
|
+
'None' # can't be nil or this doesn't get memoized
|
132
|
+
end
|
133
|
+
else
|
134
|
+
matched_intent
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
data/lib/stealth-clu.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
4
|
+
require 'rspec'
|
5
|
+
require 'stealth-clu'
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.expect_with :rspec do |expectations|
|
9
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
10
|
+
# and `failure_message` of custom matchers include text for helper methods
|
11
|
+
# defined using `chain`, e.g.:
|
12
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
13
|
+
# # => "be bigger than 2 and smaller than 4"
|
14
|
+
# ...rather than:
|
15
|
+
# # => "be bigger than 2"
|
16
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
17
|
+
end
|
18
|
+
|
19
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
20
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
21
|
+
config.mock_with :rspec do |mocks|
|
22
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
23
|
+
# a real object. This is generally recommended, and will default to
|
24
|
+
# `true` in RSpec 4.
|
25
|
+
mocks.verify_partial_doubles = true
|
26
|
+
end
|
27
|
+
|
28
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
29
|
+
# have no way to turn it off -- the option exists only for backwards
|
30
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
31
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
32
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
33
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
34
|
+
|
35
|
+
# The settings below are suggested to provide a good initial experience
|
36
|
+
# with RSpec, but feel free to customize to your heart's content.
|
37
|
+
=begin
|
38
|
+
# This allows you to limit a spec run to individual examples or groups
|
39
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
40
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
41
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
42
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
43
|
+
config.filter_run_when_matching :focus
|
44
|
+
|
45
|
+
# Allows RSpec to persist some state between runs in order to support
|
46
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
47
|
+
# you configure your source control system to ignore this file.
|
48
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
49
|
+
|
50
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
51
|
+
# recommended. For more details, see:
|
52
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
53
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
54
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
55
|
+
config.disable_monkey_patching!
|
56
|
+
|
57
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
58
|
+
# file, and it's useful to allow more verbose output when running an
|
59
|
+
# individual spec file.
|
60
|
+
if config.files_to_run.one?
|
61
|
+
# Use the documentation formatter for detailed output,
|
62
|
+
# unless a formatter has already been configured
|
63
|
+
# (e.g. via a command-line flag).
|
64
|
+
config.default_formatter = 'doc'
|
65
|
+
end
|
66
|
+
|
67
|
+
# Print the 10 slowest examples and example groups at the
|
68
|
+
# end of the spec run, to help surface which specs are running
|
69
|
+
# particularly slow.
|
70
|
+
config.profile_examples = 10
|
71
|
+
|
72
|
+
# Run specs in random order to surface order dependencies. If you find an
|
73
|
+
# order dependency and want to debug it, you can fix the order by providing
|
74
|
+
# the seed, which is printed after each run.
|
75
|
+
# --seed 1234
|
76
|
+
config.order = :random
|
77
|
+
|
78
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
79
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
80
|
+
# test failures related to randomization by passing the same `--seed` value
|
81
|
+
# as the one that triggered the failure.
|
82
|
+
Kernel.srand config.seed
|
83
|
+
=end
|
84
|
+
end
|
data/stealth-clu.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
version = File.read(File.join(File.dirname(__FILE__), 'VERSION')).strip
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'stealth-clu'
|
7
|
+
s.version = version
|
8
|
+
s.summary = "Stealth CLU"
|
9
|
+
s.description = "Built-in NLP for Stealth bots via Microsoft's Conversational Language Understanding (CLU)"
|
10
|
+
s.authors = ["Emilie Morissette"]
|
11
|
+
s.email = 'emorissettegregoire@gmail.com'
|
12
|
+
s.homepage = 'http://github.com/hellostealth/stealth-clu'
|
13
|
+
s.license = 'MIT'
|
14
|
+
|
15
|
+
s.add_dependency 'stealth', '>= 2.0.0.beta'
|
16
|
+
s.add_dependency 'http', '~> 4'
|
17
|
+
|
18
|
+
s.add_development_dependency "rspec", "~> 3"
|
19
|
+
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
23
|
+
s.require_paths = ['lib']
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: stealth-clu
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Emilie Morissette
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-09-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: stealth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.0.beta
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.0.beta
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: http
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3'
|
55
|
+
description: Built-in NLP for Stealth bots via Microsoft's Conversational Language
|
56
|
+
Understanding (CLU)
|
57
|
+
email: emorissettegregoire@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".github/workflows/ci.yml"
|
63
|
+
- ".github/workflows/release.yml"
|
64
|
+
- ".gitignore"
|
65
|
+
- ".rspec"
|
66
|
+
- Gemfile
|
67
|
+
- Gemfile.lock
|
68
|
+
- LICENSE
|
69
|
+
- README.md
|
70
|
+
- VERSION
|
71
|
+
- lib/stealth-clu.rb
|
72
|
+
- lib/stealth/nlp/clu.rb
|
73
|
+
- lib/stealth/nlp/clu/client.rb
|
74
|
+
- lib/stealth/nlp/clu/result.rb
|
75
|
+
- spec/spec_helper.rb
|
76
|
+
- stealth-clu.gemspec
|
77
|
+
homepage: http://github.com/hellostealth/stealth-clu
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata: {}
|
81
|
+
post_install_message:
|
82
|
+
rdoc_options: []
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
requirements: []
|
96
|
+
rubygems_version: 3.3.27
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: Stealth CLU
|
100
|
+
test_files: []
|