natter 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d23d6a31af6c237271183dfa0f5fc968e69189ff
4
- data.tar.gz: 6dfcab88b1e463843c39bb65ba3c3e22d0aeaa8b
3
+ metadata.gz: e82826a5f958086cdf0af5610b338c96485193d7
4
+ data.tar.gz: abcc661c8395a04a9b6efe86ac34d97ecd94e476
5
5
  SHA512:
6
- metadata.gz: 447999c1be544e5c8296568f6c291b2490b382a118bc1036f29dbde1ddc7e544e8928c89d3068c96e8583c4b99900e31611bac8ccefacaafc373107ffb96cc4e
7
- data.tar.gz: d2c2db34529b8b8fabf91b1c91dfe50968f10e66ce1148d3abff0c6c98219cf32ae86fb7d28127b9061ff469024185f5cfc1d81857043d7acfd5a153857e69c1
6
+ metadata.gz: 989c2bf070947318c652f982308b36af1c54ba65f50f0ff58a7e8949bbb7c2427bcef167e572c01188ab3937a0a6a9d961686f8a7bdd90393d70060eae4caae3
7
+ data.tar.gz: d3ba8862c8cc6950c41ea17bc5f3cc88febbb16eb8f03059385a79d5012ec872509d92183448a9b3f3356e7be559083d59cb6dd56226baae52f1bcddd215d624
data/lib/natter/parser.rb CHANGED
@@ -2,6 +2,9 @@ module Natter
2
2
  # Public: The parser is the main workhorse, responsible for deriving the
3
3
  # intent from an utterance.
4
4
  class Parser
5
+ # Read access to the Hash containing known rules.
6
+ attr_reader :rules
7
+
5
8
  def initialize
6
9
  @known_utterances = Hash.new # key = utterance, value = Intent
7
10
  @contractions = init_contractions # key = contraction, value = expansion
@@ -32,7 +35,7 @@ module Natter
32
35
  add_rule(rules)
33
36
  end
34
37
  end
35
-
38
+
36
39
  # Public: Adds a pre-computed utterance/intent pair to the parser.
37
40
  # Used when a specific utterance(s) match a predetermined intent. This saves
38
41
  # overhead as there is no regex processing required. These utterances are
@@ -1,3 +1,3 @@
1
1
  module Natter
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garry Pettet