sequitur 0.0.06 → 0.0.07

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWU5NWNmNThiYzM0M2UxOWU2ZGY4Mzc3ZTkzOWM2NGM2M2ZkNGYyYg==
4
+ YjliZTY3NWVkYWRmNzI3ZmZmNDI2YWU5ZjY0NzUxZjg1ZWQ3ZTFmMg==
5
5
  data.tar.gz: !binary |-
6
- MDk3ZjQ3NGM0NTFjZDM4NzIzOGExMDdjZDIwYTA4NTZiNmY3YTEwYg==
6
+ Y2ZjNGYxNDk1NGYxMTE5NTBiYzkyOWYyMGRjYmUyNGMzMGE2MTUxZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDFmZWEzZWQ1MWIzNzg4YTA3MmZhNDc1ZTkxYjE1ODY3MzgyMzlhMWI0MDVm
10
- MDUwMTY1OTI0ZTkxYzhjZGEwYWRjNTVjMWZkNzkxMzgxNjQ3ZjcwZmQ2NmI0
11
- Y2VmYTA3NzhjMjg0NTE3ZGU2YzNlNjU3Mjk5NTBhMTA0ODQ5M2Y=
9
+ NzBmZDFiMGQyNWFiNjMzMDAwYTM3ODQ0ZDk4YmUzMTNiYmNjNTE3MGU2ZWZl
10
+ ZjNmNzdkYzgwOTZiZmZjYjM2NzVkNDIxODhlZDMwMjM1YjIxMDA5ZjhkMTU5
11
+ ZGNkMDQwNDZkNDRmMWI4NWY2ZWIyMWQwYTAwZDZlZjNjOTVjNWQ=
12
12
  data.tar.gz: !binary |-
13
- NGNhMmUzZTEyOWQ5N2QyZGExOTljMzJmMmZmNGVjMjRjNjU2NzkyN2EwOTg1
14
- YzU0YTcwYzc3OWI0MDdhNjY4NDVjZmVhYzZhMGE4YjY3NDM5NTY4M2NhZDhi
15
- MTZhYmQyNmZkMzhjZjIzZDE2NjVkZDhmM2Y4NWZiOGViNzg1MzM=
13
+ ZDEzY2IyZDk5ZGMxMWY0ZDJiZGMxZDA2ZDM2MzcwNTRhNTRhYWEyODUxNDBl
14
+ ZTE2OTUxOGM4ZDk4MTdlYmU0ZWI1NGM0ZTNlMWI5MTgzMzg3Y2FmMzhhNTU3
15
+ ZmYxMTg3NGNkMDljZGQ3MzhmMmQyMWNkZWQ2NjFiYzhlZTlmNTY=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 0.0.07 / 2014-08-24
2
+ * [CHANGE] `digram.rb`: Updated Digram class documentation.
3
+
1
4
  ### 0.0.06 / 2014-08-24
2
5
  * [CHANGE] `.rubocop.yml`: Enabled FileName cop and updated source file names accordingly.
3
6
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Sequitur # Module used as a namespace
5
5
  # The version number of the gem.
6
- Version = '0.0.06'
6
+ Version = '0.0.07'
7
7
 
8
8
  # Brief description of the gem.
9
9
  Description = 'Ruby implementation of the Sequitur algorithm'
@@ -1,6 +1,11 @@
1
+ # File: digram.rb
2
+
1
3
  module Sequitur # Module for classes implementing the Sequitur algorithm
2
4
 
3
- # A digram is a sequence of two grammar symbols (terminal or not).
5
+ # In linguitics, a digram is a sequence of two letters.
6
+ # In Sequitur a digram is a sequence of two consecutive symbols that
7
+ # appear in a grammar (production) rule. Each symbol in a digram
8
+ # can be a terminal or not.
4
9
  class Digram
5
10
  # The sequence of two consecutive grammar symbols.
6
11
  attr_reader(:symbols)
@@ -12,12 +17,16 @@ class Digram
12
17
  attr_reader(:key)
13
18
 
14
19
  # Constructor.
20
+ # @param symbol1 [StringOrSymbol] First element of the digram
21
+ # @param symbol2 [StringOrSymbol] Second element of the digram
22
+ # @param aProduction [Production] Production in which the RHS
23
+ # the sequence symbol1 symbol2 appears.
15
24
  def initialize(symbol1, symbol2, aProduction)
16
25
  @symbols = [symbol1, symbol2]
17
26
  @key = "#{symbol1.hash.to_s(16)}:#{symbol2.hash.to_s(16)}"
18
27
  @production_id = aProduction.object_id
19
28
  end
20
-
29
+
21
30
  # Return the production object of this digram
22
31
  def production()
23
32
  ObjectSpace._id2ref(production_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequitur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.06
4
+ version: 0.0.07
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Geshef