stepmod-utils 0.3.5 → 0.3.7
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 +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +4 -3
- data/.rubocop.yml +1 -1
- data/Gemfile +3 -3
- data/Rakefile +1 -1
- data/exe/stepmod-annotate-all +17 -11
- data/exe/stepmod-build-resource-docs-cache +8 -7
- data/exe/stepmod-convert-express-description +6 -4
- data/exe/stepmod-convert-express-resource +6 -4
- data/exe/stepmod-extract-terms +38 -25
- data/exe/stepmod-find-express-files +8 -7
- data/lib/stepmod/utils/bibdata.rb +31 -35
- data/lib/stepmod/utils/cleaner.rb +3 -3
- data/lib/stepmod/utils/concept.rb +30 -35
- data/lib/stepmod/utils/converters/a.rb +7 -10
- data/lib/stepmod/utils/converters/blockquote.rb +4 -4
- data/lib/stepmod/utils/converters/br.rb +1 -1
- data/lib/stepmod/utils/converters/bypass.rb +33 -33
- data/lib/stepmod/utils/converters/clause_ref.rb +3 -3
- data/lib/stepmod/utils/converters/code.rb +1 -1
- data/lib/stepmod/utils/converters/comment.rb +5 -3
- data/lib/stepmod/utils/converters/dd.rb +2 -2
- data/lib/stepmod/utils/converters/def.rb +19 -19
- data/lib/stepmod/utils/converters/drop.rb +2 -2
- data/lib/stepmod/utils/converters/dt.rb +2 -2
- data/lib/stepmod/utils/converters/em.rb +1 -1
- data/lib/stepmod/utils/converters/em_express_description.rb +1 -1
- data/lib/stepmod/utils/converters/eqn.rb +28 -26
- data/lib/stepmod/utils/converters/example.rb +5 -6
- data/lib/stepmod/utils/converters/express_g.rb +10 -9
- data/lib/stepmod/utils/converters/express_ref.rb +2 -2
- data/lib/stepmod/utils/converters/express_ref_express_description.rb +3 -2
- data/lib/stepmod/utils/converters/ext_description.rb +1 -1
- data/lib/stepmod/utils/converters/figure.rb +3 -3
- data/lib/stepmod/utils/converters/fund_cons.rb +1 -1
- data/lib/stepmod/utils/converters/head.rb +3 -2
- data/lib/stepmod/utils/converters/hr.rb +2 -2
- data/lib/stepmod/utils/converters/ignore.rb +3 -3
- data/lib/stepmod/utils/converters/introduction.rb +1 -1
- data/lib/stepmod/utils/converters/module_ref.rb +6 -6
- data/lib/stepmod/utils/converters/note.rb +5 -6
- data/lib/stepmod/utils/converters/ol.rb +5 -5
- data/lib/stepmod/utils/converters/p.rb +2 -2
- data/lib/stepmod/utils/converters/pass_through.rb +2 -2
- data/lib/stepmod/utils/converters/q.rb +1 -1
- data/lib/stepmod/utils/converters/schema.rb +1 -1
- data/lib/stepmod/utils/converters/stem.rb +1 -1
- data/lib/stepmod/utils/converters/stepmod_ext_description.rb +5 -4
- data/lib/stepmod/utils/converters/strong.rb +5 -4
- data/lib/stepmod/utils/converters/sub.rb +2 -2
- data/lib/stepmod/utils/converters/sup.rb +2 -2
- data/lib/stepmod/utils/converters/synonym.rb +2 -2
- data/lib/stepmod/utils/converters/table.rb +7 -9
- data/lib/stepmod/utils/converters/term.rb +18 -9
- data/lib/stepmod/utils/converters/text.rb +11 -13
- data/lib/stepmod/utils/converters/uof.rb +3 -4
- data/lib/stepmod/utils/html_to_asciimath.rb +91 -90
- data/lib/stepmod/utils/smrl_description_converter.rb +34 -33
- data/lib/stepmod/utils/smrl_resource_converter.rb +50 -49
- data/lib/stepmod/utils/stepmod_definition_converter.rb +39 -38
- data/lib/stepmod/utils/stepmod_file_annotator.rb +26 -19
- data/lib/stepmod/utils/terms_extractor.rb +138 -86
- data/lib/stepmod/utils/version.rb +1 -1
- data/stepmod-utils.gemspec +11 -5
- metadata +71 -15
@@ -5,7 +5,7 @@ module Stepmod
|
|
5
5
|
module Converters
|
6
6
|
class Schema < ReverseAdoc::Converters::Base
|
7
7
|
def convert(node, state = {})
|
8
|
-
state = state.merge(schema_name: node[
|
8
|
+
state = state.merge(schema_name: node["name"])
|
9
9
|
<<~TEMPLATE
|
10
10
|
(*"#{node['name']}"
|
11
11
|
#{treat_children(node, state).strip}
|
@@ -3,8 +3,8 @@ module Stepmod
|
|
3
3
|
module Converters
|
4
4
|
class StepmodExtDescription < ReverseAdoc::Converters::Base
|
5
5
|
def convert(node, state = {})
|
6
|
-
state = state.merge(schema_name: node[
|
7
|
-
linkend = node[
|
6
|
+
state = state.merge(schema_name: node["linkend"])
|
7
|
+
linkend = node["linkend"].split(".")
|
8
8
|
|
9
9
|
# We only want ENTITY entries, not their attributes
|
10
10
|
# https://github.com/metanorma/iso-10303-2/issues/36#issuecomment-841300092
|
@@ -32,13 +32,14 @@ module Stepmod
|
|
32
32
|
<<~TEMPLATE
|
33
33
|
=== #{linkend.last}
|
34
34
|
|
35
|
-
#{domain ? "domain:[
|
35
|
+
#{domain ? "domain:[#{domain}]" : ''}
|
36
36
|
|
37
37
|
#{child_text}
|
38
38
|
TEMPLATE
|
39
39
|
end
|
40
40
|
end
|
41
|
-
ReverseAdoc::Converters.register :ext_description,
|
41
|
+
ReverseAdoc::Converters.register :ext_description,
|
42
|
+
StepmodExtDescription.new
|
42
43
|
end
|
43
44
|
end
|
44
45
|
end
|
@@ -4,14 +4,15 @@ module Stepmod
|
|
4
4
|
module Utils
|
5
5
|
module Converters
|
6
6
|
class Strong < ReverseAdoc::Converters::Base
|
7
|
-
BLANK_CHARS = "{blank}"
|
7
|
+
BLANK_CHARS = "{blank}"
|
8
8
|
|
9
9
|
def convert(node, state = {})
|
10
10
|
content = treat_children(node, state.merge(already_strong: true))
|
11
11
|
if content.strip.empty? || state[:already_strong]
|
12
12
|
content
|
13
13
|
else
|
14
|
-
handle_express_escape_seq(node,
|
14
|
+
handle_express_escape_seq(node,
|
15
|
+
"#{content[/^\s*/]}*#{content.strip}*#{content[/\s*$/]}")
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
@@ -30,7 +31,7 @@ module Stepmod
|
|
30
31
|
|
31
32
|
def braces_sibling?(sibling, end_of_text = false)
|
32
33
|
match = end_of_text ? /\($/ : /^\)/
|
33
|
-
sibling
|
34
|
+
sibling&.text? && sibling.text =~ match
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -38,4 +39,4 @@ module Stepmod
|
|
38
39
|
ReverseAdoc::Converters.register :b, Strong.new
|
39
40
|
end
|
40
41
|
end
|
41
|
-
end
|
42
|
+
end
|
@@ -6,7 +6,7 @@ module Stepmod
|
|
6
6
|
class Sub < ReverseAdoc::Converters::Base
|
7
7
|
def convert(node, state = {})
|
8
8
|
content = treat_children(node, state)
|
9
|
-
return stem_notation(content) if node.parent.name ==
|
9
|
+
return stem_notation(content) if node.parent.name == "eqn"
|
10
10
|
|
11
11
|
"#{content[/^\s*/]}~#{content.strip}~#{content[/\s*$/]}"
|
12
12
|
end
|
@@ -21,4 +21,4 @@ module Stepmod
|
|
21
21
|
ReverseAdoc::Converters.register :sub, Sub.new
|
22
22
|
end
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
@@ -6,7 +6,7 @@ module Stepmod
|
|
6
6
|
class Sup < ReverseAdoc::Converters::Base
|
7
7
|
def convert(node, state = {})
|
8
8
|
content = treat_children(node, state)
|
9
|
-
return stem_notation(content) if node.parent.name ==
|
9
|
+
return stem_notation(content) if node.parent.name == "eqn"
|
10
10
|
|
11
11
|
"#{content[/^\s*/]}^#{content.strip}^#{content[/\s*$/]}"
|
12
12
|
end
|
@@ -19,4 +19,4 @@ module Stepmod
|
|
19
19
|
ReverseAdoc::Converters.register :sup, Sup.new
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -4,7 +4,7 @@ module Stepmod
|
|
4
4
|
module Utils
|
5
5
|
module Converters
|
6
6
|
class Synonym < ReverseAdoc::Converters::Base
|
7
|
-
def convert(node,
|
7
|
+
def convert(node, _state = {})
|
8
8
|
"alt:[#{node.text.strip}]"
|
9
9
|
end
|
10
10
|
end
|
@@ -12,4 +12,4 @@ module Stepmod
|
|
12
12
|
ReverseAdoc::Converters.register :synonym, Synonym.new
|
13
13
|
end
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
@@ -5,12 +5,13 @@ module Stepmod
|
|
5
5
|
module Converters
|
6
6
|
class Table < ReverseAdoc::Converters::Base
|
7
7
|
def convert(node, state = {})
|
8
|
-
id = node[
|
8
|
+
id = node["id"]
|
9
9
|
anchor = id ? "[[#{id}]]\n" : ""
|
10
|
-
title = node[
|
10
|
+
title = node["caption"].to_s
|
11
11
|
title = ".#{title}\n" unless title.empty?
|
12
12
|
attrs = style(node)
|
13
|
-
"\n\n#{anchor}#{attrs}#{title}|===\n#{treat_children(node,
|
13
|
+
"\n\n#{anchor}#{attrs}#{title}|===\n#{treat_children(node,
|
14
|
+
state)}\n|===\n"
|
14
15
|
end
|
15
16
|
|
16
17
|
def frame(node)
|
@@ -23,8 +24,6 @@ module Stepmod
|
|
23
24
|
"frame=sides"
|
24
25
|
when "box", "border"
|
25
26
|
"frame=all"
|
26
|
-
else
|
27
|
-
nil
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
@@ -38,13 +37,11 @@ module Stepmod
|
|
38
37
|
"rules=cols"
|
39
38
|
when "none"
|
40
39
|
"rules=none"
|
41
|
-
else
|
42
|
-
nil
|
43
40
|
end
|
44
41
|
end
|
45
42
|
|
46
43
|
def style(node)
|
47
|
-
width = "width=#{node['width']}" if node[
|
44
|
+
width = "width=#{node['width']}" if node["width"]
|
48
45
|
attrs = []
|
49
46
|
frame_attr = frame(node)
|
50
47
|
rules_attr = rules(node)
|
@@ -52,6 +49,7 @@ module Stepmod
|
|
52
49
|
attrs += frame_attr if frame_attr
|
53
50
|
attrs += rules_attr if rules_attr
|
54
51
|
return "" if attrs.empty?
|
52
|
+
|
55
53
|
"[#{attrs.join(',')}]\n"
|
56
54
|
end
|
57
55
|
end
|
@@ -59,4 +57,4 @@ module Stepmod
|
|
59
57
|
ReverseAdoc::Converters.register :table, Table.new
|
60
58
|
end
|
61
59
|
end
|
62
|
-
end
|
60
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "stepmod/utils/converters/synonym"
|
4
4
|
|
5
5
|
module Stepmod
|
6
6
|
module Utils
|
@@ -8,22 +8,31 @@ module Stepmod
|
|
8
8
|
class Term < ReverseAdoc::Converters::Base
|
9
9
|
def convert(node, state = {})
|
10
10
|
first_child = node.children.find do |child|
|
11
|
-
|
12
|
-
|
11
|
+
child.name == "text" && !child.text.to_s.strip.empty?
|
12
|
+
end
|
13
13
|
unless first_child &&
|
14
|
-
|
15
|
-
|
16
|
-
return "=== #{treat_children(node, state).strip}"
|
14
|
+
node.text.split(";").length == 2 &&
|
15
|
+
defined?(Stepmod::Utils::Converters::Synonym)
|
16
|
+
return "=== #{treat_acronym(treat_children(node, state).strip)}"
|
17
17
|
end
|
18
18
|
|
19
|
-
term_def, alt = node.text.split(
|
19
|
+
term_def, alt = node.text.split(";")
|
20
20
|
alt_xml = Nokogiri::XML::Text.new(alt, Nokogiri::XML::Document.new)
|
21
21
|
converted_alt = Stepmod::Utils::Converters::Synonym.new.convert(alt_xml)
|
22
|
-
"=== #{term_def}\n\n#{converted_alt}"
|
22
|
+
"=== #{treat_acronym(term_def)}\n\n#{converted_alt}"
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def treat_acronym(term_def)
|
28
|
+
return term_def if term_def !~ /.+\(.+?\)$/
|
29
|
+
|
30
|
+
_, term_text, term_acronym = term_def.match(/(.+?)(\(.+\))$/).to_a
|
31
|
+
"#{term_text}\nalt:[#{term_acronym.gsub(/\(|\)/, '')}]"
|
23
32
|
end
|
24
33
|
end
|
25
34
|
|
26
35
|
ReverseAdoc::Converters.register :term, Term.new
|
27
36
|
end
|
28
37
|
end
|
29
|
-
end
|
38
|
+
end
|
@@ -16,14 +16,14 @@ module Stepmod
|
|
16
16
|
|
17
17
|
def treat_empty(node, state)
|
18
18
|
parent = node.parent.name.to_sym
|
19
|
-
if [
|
20
|
-
|
19
|
+
if %i[ol ul].include?(parent) # Otherwise the identation is broken
|
20
|
+
""
|
21
21
|
elsif state[:tdsinglepara]
|
22
|
-
|
23
|
-
elsif node.text ==
|
24
|
-
|
22
|
+
""
|
23
|
+
elsif node.text == " " # Regular whitespace text node
|
24
|
+
" "
|
25
25
|
else
|
26
|
-
|
26
|
+
""
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -34,9 +34,7 @@ module Stepmod
|
|
34
34
|
text = remove_border_newlines(text)
|
35
35
|
|
36
36
|
text = preserve_keychars_within_backticks(text)
|
37
|
-
|
38
|
-
|
39
|
-
text
|
37
|
+
preserve_tags(text)
|
40
38
|
end
|
41
39
|
|
42
40
|
def preserve_nbsp(text)
|
@@ -44,20 +42,20 @@ module Stepmod
|
|
44
42
|
end
|
45
43
|
|
46
44
|
def preserve_tags(text)
|
47
|
-
text.gsub(/[<>]/,
|
45
|
+
text.gsub(/[<>]/, ">" => '\>', "<" => '\<')
|
48
46
|
end
|
49
47
|
|
50
48
|
def remove_border_newlines(text)
|
51
|
-
text.gsub(/\A\n+/,
|
49
|
+
text.gsub(/\A\n+/, "").gsub(/\n+\z/, "")
|
52
50
|
end
|
53
51
|
|
54
52
|
def remove_inner_newlines(text)
|
55
|
-
text.tr("\n\t",
|
53
|
+
text.tr("\n\t", " ").squeeze(" ")
|
56
54
|
end
|
57
55
|
|
58
56
|
def preserve_keychars_within_backticks(text)
|
59
57
|
text.gsub(/`.*?`/) do |match|
|
60
|
-
match.gsub('\_',
|
58
|
+
match.gsub('\_', "_").gsub('\*', "*")
|
61
59
|
end
|
62
60
|
end
|
63
61
|
end
|
@@ -1,15 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "stepmod/utils/converters/synonym"
|
4
4
|
|
5
5
|
module Stepmod
|
6
6
|
module Utils
|
7
7
|
module Converters
|
8
8
|
class Uof < ReverseAdoc::Converters::Base
|
9
|
-
def convert(
|
10
|
-
|
9
|
+
def convert(_node, _state = {})
|
11
10
|
# WARNING: <uof> tag content is deprecated
|
12
|
-
|
11
|
+
""
|
13
12
|
|
14
13
|
#
|
15
14
|
# <<~TEXT
|
@@ -6,7 +6,7 @@ module Stepmod
|
|
6
6
|
|
7
7
|
to_asciimath = Nokogiri::HTML.fragment(input, "UTF-8")
|
8
8
|
|
9
|
-
to_asciimath.css(
|
9
|
+
to_asciimath.css("i").each do |math_element|
|
10
10
|
# puts "HTML MATH!! #{math_element.to_xml}"
|
11
11
|
# puts "HTML MATH!! #{math_element.text}"
|
12
12
|
decoded = text_to_asciimath(math_element.text)
|
@@ -21,7 +21,7 @@ module Stepmod
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
to_asciimath.css(
|
24
|
+
to_asciimath.css("sub").each do |math_element|
|
25
25
|
case math_element.text.length
|
26
26
|
when 0
|
27
27
|
math_element.remove
|
@@ -30,7 +30,7 @@ module Stepmod
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
to_asciimath.css(
|
33
|
+
to_asciimath.css("sup").each do |math_element|
|
34
34
|
case math_element.text.length
|
35
35
|
when 0
|
36
36
|
math_element.remove
|
@@ -39,14 +39,14 @@ module Stepmod
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
to_asciimath.css(
|
43
|
-
element.css(
|
42
|
+
to_asciimath.css("ol").each do |element|
|
43
|
+
element.css("li").each do |li|
|
44
44
|
li.replace ". #{li.text}"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
to_asciimath.css(
|
49
|
-
element.css(
|
48
|
+
to_asciimath.css("ul").each do |element|
|
49
|
+
element.css("li").each do |li|
|
50
50
|
li.replace "* #{li.text}"
|
51
51
|
end
|
52
52
|
end
|
@@ -57,7 +57,8 @@ module Stepmod
|
|
57
57
|
end
|
58
58
|
|
59
59
|
html_entities_to_stem(
|
60
|
-
to_asciimath.children.to_s.gsub(/\]stem:\[/,
|
60
|
+
to_asciimath.children.to_s.gsub(/\]stem:\[/, "").gsub(/<\/?[uo]l>/,
|
61
|
+
""),
|
61
62
|
)
|
62
63
|
end
|
63
64
|
|
@@ -66,91 +67,91 @@ module Stepmod
|
|
66
67
|
end
|
67
68
|
|
68
69
|
def html_entities_to_asciimath(x)
|
69
|
-
x.gsub("α", "alpha")
|
70
|
-
gsub("β", "beta")
|
71
|
-
gsub("γ", "gamma")
|
72
|
-
gsub("Γ", "Gamma")
|
73
|
-
gsub("δ", "delta")
|
74
|
-
gsub("Δ", "Delta")
|
75
|
-
gsub("ε", "epsilon")
|
76
|
-
gsub("ϵ", "varepsilon")
|
77
|
-
gsub("ζ", "zeta")
|
78
|
-
gsub("η", "eta")
|
79
|
-
gsub("θ", "theta")
|
80
|
-
gsub("Θ", "Theta")
|
81
|
-
gsub("ϑ", "vartheta")
|
82
|
-
gsub("ι", "iota")
|
83
|
-
gsub("κ", "kappa")
|
84
|
-
gsub("λ", "lambda")
|
85
|
-
gsub("Λ", "Lambda")
|
86
|
-
gsub("μ", "mu")
|
87
|
-
gsub("ν", "nu")
|
88
|
-
gsub("ξ", "xi")
|
89
|
-
gsub("Ξ", "Xi")
|
90
|
-
gsub("π", "pi")
|
91
|
-
gsub("Π", "Pi")
|
92
|
-
gsub("ρ", "rho")
|
93
|
-
gsub("β", "beta")
|
94
|
-
gsub("σ", "sigma")
|
95
|
-
gsub("Σ", "Sigma")
|
96
|
-
gsub("τ", "tau")
|
97
|
-
gsub("υ", "upsilon")
|
98
|
-
gsub("φ", "phi")
|
99
|
-
gsub("Φ", "Phi")
|
100
|
-
gsub("ϕ", "varphi")
|
101
|
-
gsub("χ", "chi")
|
102
|
-
gsub("ψ", "psi")
|
103
|
-
gsub("Ψ", "Psi")
|
104
|
-
gsub("ω", "omega")
|
105
|
-
gsub("χ", "χ")
|
106
|
-
gsub("×", "×")
|
107
|
-
gsub("Σ", "Σ")
|
108
|
-
gsub("ρ", "ρ")
|
109
|
-
gsub("σ", "σ")
|
110
|
-
gsub("λ", "λ")
|
111
|
-
gsub("τ", "τ")
|
112
|
-
gsub("∂", "∂")
|
113
|
-
gsub("≤", "≤")
|
114
|
-
gsub("≥", "≥")
|
70
|
+
x.gsub("α", "alpha")
|
71
|
+
.gsub("β", "beta")
|
72
|
+
.gsub("γ", "gamma")
|
73
|
+
.gsub("Γ", "Gamma")
|
74
|
+
.gsub("δ", "delta")
|
75
|
+
.gsub("Δ", "Delta")
|
76
|
+
.gsub("ε", "epsilon")
|
77
|
+
.gsub("ϵ", "varepsilon")
|
78
|
+
.gsub("ζ", "zeta")
|
79
|
+
.gsub("η", "eta")
|
80
|
+
.gsub("θ", "theta")
|
81
|
+
.gsub("Θ", "Theta")
|
82
|
+
.gsub("ϑ", "vartheta")
|
83
|
+
.gsub("ι", "iota")
|
84
|
+
.gsub("κ", "kappa")
|
85
|
+
.gsub("λ", "lambda")
|
86
|
+
.gsub("Λ", "Lambda")
|
87
|
+
.gsub("μ", "mu")
|
88
|
+
.gsub("ν", "nu")
|
89
|
+
.gsub("ξ", "xi")
|
90
|
+
.gsub("Ξ", "Xi")
|
91
|
+
.gsub("π", "pi")
|
92
|
+
.gsub("Π", "Pi")
|
93
|
+
.gsub("ρ", "rho")
|
94
|
+
.gsub("β", "beta")
|
95
|
+
.gsub("σ", "sigma")
|
96
|
+
.gsub("Σ", "Sigma")
|
97
|
+
.gsub("τ", "tau")
|
98
|
+
.gsub("υ", "upsilon")
|
99
|
+
.gsub("φ", "phi")
|
100
|
+
.gsub("Φ", "Phi")
|
101
|
+
.gsub("ϕ", "varphi")
|
102
|
+
.gsub("χ", "chi")
|
103
|
+
.gsub("ψ", "psi")
|
104
|
+
.gsub("Ψ", "Psi")
|
105
|
+
.gsub("ω", "omega")
|
106
|
+
.gsub("χ", "χ")
|
107
|
+
.gsub("×", "×")
|
108
|
+
.gsub("Σ", "Σ")
|
109
|
+
.gsub("ρ", "ρ")
|
110
|
+
.gsub("σ", "σ")
|
111
|
+
.gsub("λ", "λ")
|
112
|
+
.gsub("τ", "τ")
|
113
|
+
.gsub("∂", "∂")
|
114
|
+
.gsub("≤", "≤")
|
115
|
+
.gsub("≥", "≥")
|
115
116
|
end
|
116
117
|
|
117
118
|
def html_entities_to_stem(x)
|
118
|
-
x.gsub("α", "stem:[alpha]")
|
119
|
-
gsub("β", "stem:[beta]")
|
120
|
-
gsub("γ", "stem:[gamma]")
|
121
|
-
gsub("Γ", "stem:[Gamma]")
|
122
|
-
gsub("δ", "stem:[delta]")
|
123
|
-
gsub("Δ", "stem:[Delta]")
|
124
|
-
gsub("ε", "stem:[epsilon]")
|
125
|
-
gsub("ϵ", "stem:[varepsilon]")
|
126
|
-
gsub("ζ", "stem:[zeta]")
|
127
|
-
gsub("η", "stem:[eta]")
|
128
|
-
gsub("θ", "stem:[theta]")
|
129
|
-
gsub("Θ", "stem:[Theta]")
|
130
|
-
gsub("ϑ", "stem:[vartheta]")
|
131
|
-
gsub("ι", "stem:[iota]")
|
132
|
-
gsub("κ", "stem:[kappa]")
|
133
|
-
gsub("λ", "stem:[lambda]")
|
134
|
-
gsub("Λ", "stem:[Lambda]")
|
135
|
-
gsub("μ", "stem:[mu]")
|
136
|
-
gsub("ν", "stem:[nu]")
|
137
|
-
gsub("ξ", "stem:[xi]")
|
138
|
-
gsub("Ξ", "stem:[Xi]")
|
139
|
-
gsub("π", "stem:[pi]")
|
140
|
-
gsub("Π", "stem:[Pi]")
|
141
|
-
gsub("ρ", "stem:[rho]")
|
142
|
-
gsub("β", "stem:[beta]")
|
143
|
-
gsub("σ", "stem:[sigma]")
|
144
|
-
gsub("Σ", "stem:[Sigma]")
|
145
|
-
gsub("τ", "stem:[tau]")
|
146
|
-
gsub("υ", "stem:[upsilon]")
|
147
|
-
gsub("φ", "stem:[phi]")
|
148
|
-
gsub("Φ", "stem:[Phi]")
|
149
|
-
gsub("ϕ", "stem:[varphi]")
|
150
|
-
gsub("χ", "stem:[chi]")
|
151
|
-
gsub("ψ", "stem:[psi]")
|
152
|
-
gsub("Ψ", "stem:[Psi]")
|
153
|
-
gsub("ω", "stem:[omega]")
|
119
|
+
x.gsub("α", "stem:[alpha]")
|
120
|
+
.gsub("β", "stem:[beta]")
|
121
|
+
.gsub("γ", "stem:[gamma]")
|
122
|
+
.gsub("Γ", "stem:[Gamma]")
|
123
|
+
.gsub("δ", "stem:[delta]")
|
124
|
+
.gsub("Δ", "stem:[Delta]")
|
125
|
+
.gsub("ε", "stem:[epsilon]")
|
126
|
+
.gsub("ϵ", "stem:[varepsilon]")
|
127
|
+
.gsub("ζ", "stem:[zeta]")
|
128
|
+
.gsub("η", "stem:[eta]")
|
129
|
+
.gsub("θ", "stem:[theta]")
|
130
|
+
.gsub("Θ", "stem:[Theta]")
|
131
|
+
.gsub("ϑ", "stem:[vartheta]")
|
132
|
+
.gsub("ι", "stem:[iota]")
|
133
|
+
.gsub("κ", "stem:[kappa]")
|
134
|
+
.gsub("λ", "stem:[lambda]")
|
135
|
+
.gsub("Λ", "stem:[Lambda]")
|
136
|
+
.gsub("μ", "stem:[mu]")
|
137
|
+
.gsub("ν", "stem:[nu]")
|
138
|
+
.gsub("ξ", "stem:[xi]")
|
139
|
+
.gsub("Ξ", "stem:[Xi]")
|
140
|
+
.gsub("π", "stem:[pi]")
|
141
|
+
.gsub("Π", "stem:[Pi]")
|
142
|
+
.gsub("ρ", "stem:[rho]")
|
143
|
+
.gsub("β", "stem:[beta]")
|
144
|
+
.gsub("σ", "stem:[sigma]")
|
145
|
+
.gsub("Σ", "stem:[Sigma]")
|
146
|
+
.gsub("τ", "stem:[tau]")
|
147
|
+
.gsub("υ", "stem:[upsilon]")
|
148
|
+
.gsub("φ", "stem:[phi]")
|
149
|
+
.gsub("Φ", "stem:[Phi]")
|
150
|
+
.gsub("ϕ", "stem:[varphi]")
|
151
|
+
.gsub("χ", "stem:[chi]")
|
152
|
+
.gsub("ψ", "stem:[psi]")
|
153
|
+
.gsub("Ψ", "stem:[Psi]")
|
154
|
+
.gsub("ω", "stem:[omega]")
|
154
155
|
end
|
155
156
|
end
|
156
157
|
end
|