text_alignment 0.2.5 → 0.2.6

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
  SHA256:
3
- metadata.gz: 554ab8168601f32f8d2dc92db4b38e4c556bce415d405e2952da3e1f5b8fab9f
4
- data.tar.gz: 391db86a6c6c735088d34ea5c9f90a5e79316d046d748efc5dd737142bb281ea
3
+ metadata.gz: 5e9a7bcce440fe7a86655b4c8edceb92607c810a4cdf6d05baee3ffe55199db6
4
+ data.tar.gz: 739bed915b416c59c908c396f312f6b04df79cbad4075cbcbfab3a82db610fd5
5
5
  SHA512:
6
- metadata.gz: 46efef8246d0d9e0ac957525de6ab2f599004f122d5da140582198dc1465191a76557959489f585ed2bd752c260247ca34148c2d8d028df19933c15a1e2d2456
7
- data.tar.gz: 7ed3b9c16d44a2d8bab68726539c8457ee9db2fe74fb291296a73daf694e2e79b5e2a8f05bb9c3857735c5722c780c43d316dfb3b67e8af342e75fd969ee76b7
6
+ metadata.gz: f2fe7ba9a6bee8150572f7813f9ce680c8fd3fe1252292f351082d95293392969d4094e492e04f844c0bc956cbb8934213937e11b75789f4b6432f31c1e7fad0
7
+ data.tar.gz: aed5b749142693d86f26c8bdd0d68ba89727f5b8dbab916f0f476d56d253ccf63a0ea908230192d4d5e1511124b515c013fde90ffa6873a28b3124702c926339
@@ -33,7 +33,7 @@ class TextAlignment::LCSComparison
33
33
  @str2_match_initial = sdiff[match_initial].new_position
34
34
  @str1_match_final = sdiff[match_final].old_position
35
35
  @str2_match_final = sdiff[match_final].new_position
36
- @similarity = lcs / [@str1_match_final - @str1_match_initial + 1, @str2_match_final - @str2_match_initial + 1].min.to_f
36
+ @similarity = 2 * lcs / ((@str1_match_final - @str1_match_initial + 1) + (@str2_match_final - @str2_match_initial + 1)).to_f
37
37
  else
38
38
  @str1_match_initial = 0
39
39
  @str2_match_initial = 0
@@ -1,3 +1,3 @@
1
1
  class TextAlignment
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text_alignment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jin-Dong Kim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-19 00:00:00.000000000 Z
11
+ date: 2019-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-dictionary