text_alignment 0.7.2 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/align_annotations +37 -138
- data/lib/text_alignment/anchor_finder.rb +130 -62
- data/lib/text_alignment/char_mapping.rb +187 -0
- data/lib/text_alignment/constants.rb +1 -1
- data/lib/text_alignment/cultivation_map.rb +19 -0
- data/lib/text_alignment/glcs_alignment_fast.rb +2 -2
- data/lib/text_alignment/mixed_alignment.rb +7 -63
- data/lib/text_alignment/text_alignment.rb +251 -182
- data/lib/text_alignment/version.rb +1 -1
- metadata +4 -3
- data/lib/text_alignment/mappings.rb +0 -74
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.
|
4
|
+
version: 0.10.1
|
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:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-dictionary
|
@@ -77,7 +77,9 @@ files:
|
|
77
77
|
- lib/text_alignment.rb
|
78
78
|
- lib/text_alignment/anchor_finder.rb
|
79
79
|
- lib/text_alignment/approximate_fit.rb
|
80
|
+
- lib/text_alignment/char_mapping.rb
|
80
81
|
- lib/text_alignment/constants.rb
|
82
|
+
- lib/text_alignment/cultivation_map.rb
|
81
83
|
- lib/text_alignment/find_divisions.rb
|
82
84
|
- lib/text_alignment/glcs_alignment.rb
|
83
85
|
- lib/text_alignment/glcs_alignment_fast.rb
|
@@ -86,7 +88,6 @@ files:
|
|
86
88
|
- lib/text_alignment/lcs_cdiff.rb
|
87
89
|
- lib/text_alignment/lcs_comparison.rb
|
88
90
|
- lib/text_alignment/lcs_min.rb
|
89
|
-
- lib/text_alignment/mappings.rb
|
90
91
|
- lib/text_alignment/mixed_alignment.rb
|
91
92
|
- lib/text_alignment/text_alignment.rb
|
92
93
|
- lib/text_alignment/version.rb
|
@@ -1,74 +0,0 @@
|
|
1
|
-
module TextAlignment; end unless defined? TextAlignment
|
2
|
-
|
3
|
-
TextAlignment::MAPPINGS = [
|
4
|
-
["©", "(c)"], #U+00A9 (Copyright Sign)
|
5
|
-
|
6
|
-
["α", "alpha"], #U+03B1 (greek small letter alpha)
|
7
|
-
["β", "beta"], #U+03B2 (greek small letter beta)
|
8
|
-
["γ", "gamma"], #U+03B3 (greek small letter gamma)
|
9
|
-
["δ", "delta"], #U+03B4 (greek small letter delta)
|
10
|
-
["ε", "epsilon"], #U+03B5 (greek small letter epsilon)
|
11
|
-
["ζ", "zeta"], #U+03B6 (greek small letter zeta)
|
12
|
-
["η", "eta"], #U+03B7 (greek small letter eta)
|
13
|
-
["θ", "theta"], #U+03B7 (greek small letter eta)
|
14
|
-
["ι", "iota"], #U+03B7 (greek small letter eta)
|
15
|
-
["κ", "kappa"], #U+03BA (greek small letter kappa)
|
16
|
-
["λ", "lambda"], #U+03BB (greek small letter lambda)
|
17
|
-
["λ", "lamda"], #U+03BB (greek small letter lambda)
|
18
|
-
["μ", "mu"], #U+03BC (greek small letter mu)
|
19
|
-
["ν", "nu"], #U+03BD (greek small letter nu)
|
20
|
-
["ξ", "xi"], #U+03BE (greek small letter xi)
|
21
|
-
["ο", "omicron"], #U+03BF (greek small letter omicron)
|
22
|
-
["π", "pi"], #U+03C0 (greek small letter pi)
|
23
|
-
["ρ", "rho"], #U+03C1 (greek small letter rho)
|
24
|
-
["σ", "sigma"], #U+03C3 (greek small letter sigma)
|
25
|
-
["τ", "tau"], #U+03C4 (greek small letter tau)
|
26
|
-
["υ", "upsilon"], #U+03C5 (greek small letter upsilon)
|
27
|
-
["φ", "phi"], #U+03C6 (greek small letter phi)
|
28
|
-
["χ", "chi"], #U+03C7 (greek small letter chi)
|
29
|
-
["ψ", "psi"], #U+03C8 (greek small letter psi)
|
30
|
-
["ω", "omega"], #U+03C9 (greek small letter omega)
|
31
|
-
|
32
|
-
["Α", "Alpha"], #U+0391 (greek capital letter alpha)
|
33
|
-
["Β", "Beta"], #U+0392 (greek capital letter beta)
|
34
|
-
["Γ", "Gamma"], #U+0393 (greek capital letter gamma)
|
35
|
-
["Δ", "Delta"], #U+0394 (greek capital letter delta)
|
36
|
-
["Ε", "Epsilon"], #U+0395 (greek capital letter epsilon)
|
37
|
-
["Ζ", "Zeta"], #U+0396 (greek capital letter zeta)
|
38
|
-
["Η", "Eta"], #U+0397 (greek capital letter eta)
|
39
|
-
["Θ", "Theta"], #U+0398 (greek capital letter theta)
|
40
|
-
["Ι", "Iota"], #U+0399 (greek capital letter iota)
|
41
|
-
["Κ", "Kappa"], #U+039A (greek capital letter kappa)
|
42
|
-
["Λ", "Lambda"], #U+039B (greek capital letter lambda)
|
43
|
-
["Λ", "Lamda"], #U+039B (greek capital letter lambda)
|
44
|
-
["Μ", "Mu"], #U+039C (greek capital letter mu)
|
45
|
-
["Ν", "Nu"], #U+039D (greek capital letter nu)
|
46
|
-
["Ξ", "Xi"], #U+039E (greek capital letter xi)
|
47
|
-
["Ο", "Omicron"], #U+039F (greek capital letter omicron)
|
48
|
-
["Π", "Pi"], #U+03A0 (greek capital letter pi)
|
49
|
-
["Ρ", "Rho"], #U+03A1 (greek capital letter rho)
|
50
|
-
["Σ", "Sigma"], #U+03A3 (greek capital letter sigma)
|
51
|
-
["Τ", "Tau"], #U+03A4 (greek capital letter tau)
|
52
|
-
["Υ", "Upsilon"], #U+03A5 (greek capital letter upsilon)
|
53
|
-
["Φ", "Phi"], #U+03A6 (greek capital letter phi)
|
54
|
-
["Χ", "Chi"], #U+03A7 (greek capital letter chi)
|
55
|
-
["Ψ", "Psi"], #U+03A8 (greek capital letter Psi)
|
56
|
-
["Ω", "Omega"], #U+03A9 (greek capital letter omega)
|
57
|
-
|
58
|
-
["ϕ", "phi"], #U+03D5 (greek phi symbol)
|
59
|
-
|
60
|
-
["×", "x"], #U+00D7 (multiplication sign)
|
61
|
-
["•", "*"], #U+2022 (bullet)
|
62
|
-
[" ", " "], #U+2009 (thin space)
|
63
|
-
[" ", " "], #U+200A (hair space)
|
64
|
-
[" ", " "], #U+00A0 (no-break space)
|
65
|
-
[" ", " "], #U+3000 (ideographic space)
|
66
|
-
["−", "-"], #U+2212 (minus sign)
|
67
|
-
["–", "-"], #U+2013 (en dash)
|
68
|
-
["′", "'"], #U+2032 (prime)
|
69
|
-
["‘", "'"], #U+2018 (left single quotation mark)
|
70
|
-
["’", "'"], #U+2019 (right single quotation mark)
|
71
|
-
["“", '"'], #U+201C (left double quotation mark)
|
72
|
-
["”", '"'], #U+201D (right double quotation mark)
|
73
|
-
['"', "''"]
|
74
|
-
]
|