Class: TextAlignment::GLCSTextAlignment
- Inherits:
-
Object
- Object
- TextAlignment::GLCSTextAlignment
- Defined in:
- lib/text_alignment/glcs_alignment_fast.rb
Instance Attribute Summary collapse
-
#common_elements ⇒ Object
readonly
Returns the value of attribute common_elements.
-
#mapped_elements ⇒ Object
readonly
Returns the value of attribute mapped_elements.
-
#position_map_begin ⇒ Object
readonly
Returns the value of attribute position_map_begin.
-
#position_map_end ⇒ Object
readonly
Returns the value of attribute position_map_end.
-
#similarity ⇒ Object
readonly
Returns the value of attribute similarity.
-
#str1_match_final ⇒ Object
readonly
Returns the value of attribute str1_match_final.
-
#str1_match_initial ⇒ Object
readonly
Returns the value of attribute str1_match_initial.
-
#str2_match_final ⇒ Object
readonly
Returns the value of attribute str2_match_final.
-
#str2_match_initial ⇒ Object
readonly
Returns the value of attribute str2_match_initial.
Instance Method Summary collapse
-
#initialize(str1, str2, mappings = [], lcs = nil, sdiff = nil) ⇒ GLCSTextAlignment
constructor
A new instance of GLCSTextAlignment.
Constructor Details
#initialize(str1, str2, mappings = [], lcs = nil, sdiff = nil) ⇒ GLCSTextAlignment
Returns a new instance of GLCSTextAlignment.
18 19 20 21 22 23 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 18 def initialize(str1, str2, mappings = [], lcs = nil, sdiff = nil) raise ArgumentError, "nil string" if str1.nil? || str2.nil? raise ArgumentError, "nil mappings" if mappings.nil? _glcs_alignment_fast(str1, str2, mapptings, lcs, sdiff) end |
Instance Attribute Details
#common_elements ⇒ Object (readonly)
Returns the value of attribute common_elements.
14 15 16 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 14 def common_elements @common_elements end |
#mapped_elements ⇒ Object (readonly)
Returns the value of attribute mapped_elements.
14 15 16 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 14 def mapped_elements @mapped_elements end |
#position_map_begin ⇒ Object (readonly)
Returns the value of attribute position_map_begin.
13 14 15 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 13 def position_map_begin @position_map_begin end |
#position_map_end ⇒ Object (readonly)
Returns the value of attribute position_map_end.
13 14 15 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 13 def position_map_end @position_map_end end |
#similarity ⇒ Object (readonly)
Returns the value of attribute similarity.
15 16 17 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 15 def similarity @similarity end |
#str1_match_final ⇒ Object (readonly)
Returns the value of attribute str1_match_final.
16 17 18 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 16 def str1_match_final @str1_match_final end |
#str1_match_initial ⇒ Object (readonly)
Returns the value of attribute str1_match_initial.
16 17 18 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 16 def str1_match_initial @str1_match_initial end |
#str2_match_final ⇒ Object (readonly)
Returns the value of attribute str2_match_final.
16 17 18 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 16 def str2_match_final @str2_match_final end |
#str2_match_initial ⇒ Object (readonly)
Returns the value of attribute str2_match_initial.
16 17 18 |
# File 'lib/text_alignment/glcs_alignment_fast.rb', line 16 def str2_match_initial @str2_match_initial end |