stepmod-utils 0.3.5 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +1 -1
  3. data/.github/workflows/release.yml +4 -3
  4. data/.rubocop.yml +1 -1
  5. data/Gemfile +3 -3
  6. data/Rakefile +1 -1
  7. data/exe/stepmod-annotate-all +17 -11
  8. data/exe/stepmod-build-resource-docs-cache +8 -7
  9. data/exe/stepmod-convert-express-description +6 -4
  10. data/exe/stepmod-convert-express-resource +6 -4
  11. data/exe/stepmod-extract-terms +38 -25
  12. data/exe/stepmod-find-express-files +8 -7
  13. data/lib/stepmod/utils/bibdata.rb +31 -35
  14. data/lib/stepmod/utils/cleaner.rb +3 -3
  15. data/lib/stepmod/utils/concept.rb +30 -35
  16. data/lib/stepmod/utils/converters/a.rb +7 -10
  17. data/lib/stepmod/utils/converters/blockquote.rb +4 -4
  18. data/lib/stepmod/utils/converters/br.rb +1 -1
  19. data/lib/stepmod/utils/converters/bypass.rb +33 -33
  20. data/lib/stepmod/utils/converters/clause_ref.rb +3 -3
  21. data/lib/stepmod/utils/converters/code.rb +1 -1
  22. data/lib/stepmod/utils/converters/comment.rb +5 -3
  23. data/lib/stepmod/utils/converters/dd.rb +2 -2
  24. data/lib/stepmod/utils/converters/def.rb +19 -19
  25. data/lib/stepmod/utils/converters/drop.rb +2 -2
  26. data/lib/stepmod/utils/converters/dt.rb +2 -2
  27. data/lib/stepmod/utils/converters/em.rb +1 -1
  28. data/lib/stepmod/utils/converters/em_express_description.rb +1 -1
  29. data/lib/stepmod/utils/converters/eqn.rb +28 -26
  30. data/lib/stepmod/utils/converters/example.rb +5 -6
  31. data/lib/stepmod/utils/converters/express_g.rb +10 -9
  32. data/lib/stepmod/utils/converters/express_ref.rb +2 -2
  33. data/lib/stepmod/utils/converters/express_ref_express_description.rb +3 -2
  34. data/lib/stepmod/utils/converters/ext_description.rb +1 -1
  35. data/lib/stepmod/utils/converters/figure.rb +3 -3
  36. data/lib/stepmod/utils/converters/fund_cons.rb +1 -1
  37. data/lib/stepmod/utils/converters/head.rb +3 -2
  38. data/lib/stepmod/utils/converters/hr.rb +2 -2
  39. data/lib/stepmod/utils/converters/ignore.rb +3 -3
  40. data/lib/stepmod/utils/converters/introduction.rb +1 -1
  41. data/lib/stepmod/utils/converters/module_ref.rb +6 -6
  42. data/lib/stepmod/utils/converters/note.rb +5 -6
  43. data/lib/stepmod/utils/converters/ol.rb +5 -5
  44. data/lib/stepmod/utils/converters/p.rb +2 -2
  45. data/lib/stepmod/utils/converters/pass_through.rb +2 -2
  46. data/lib/stepmod/utils/converters/q.rb +1 -1
  47. data/lib/stepmod/utils/converters/schema.rb +1 -1
  48. data/lib/stepmod/utils/converters/stem.rb +1 -1
  49. data/lib/stepmod/utils/converters/stepmod_ext_description.rb +5 -4
  50. data/lib/stepmod/utils/converters/strong.rb +5 -4
  51. data/lib/stepmod/utils/converters/sub.rb +2 -2
  52. data/lib/stepmod/utils/converters/sup.rb +2 -2
  53. data/lib/stepmod/utils/converters/synonym.rb +2 -2
  54. data/lib/stepmod/utils/converters/table.rb +7 -9
  55. data/lib/stepmod/utils/converters/term.rb +18 -9
  56. data/lib/stepmod/utils/converters/text.rb +11 -13
  57. data/lib/stepmod/utils/converters/uof.rb +3 -4
  58. data/lib/stepmod/utils/html_to_asciimath.rb +91 -90
  59. data/lib/stepmod/utils/smrl_description_converter.rb +34 -33
  60. data/lib/stepmod/utils/smrl_resource_converter.rb +50 -49
  61. data/lib/stepmod/utils/stepmod_definition_converter.rb +39 -38
  62. data/lib/stepmod/utils/stepmod_file_annotator.rb +26 -19
  63. data/lib/stepmod/utils/terms_extractor.rb +138 -86
  64. data/lib/stepmod/utils/version.rb +1 -1
  65. data/stepmod-utils.gemspec +11 -5
  66. metadata +71 -15
@@ -4,10 +4,10 @@ module Stepmod
4
4
  module Utils
5
5
  module Converters
6
6
  class PassThrough < ReverseAdoc::Converters::Base
7
- def convert(node, state = {})
7
+ def convert(node, _state = {})
8
8
  node.to_s
9
9
  end
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -13,4 +13,4 @@ module Stepmod
13
13
  ReverseAdoc::Converters.register :q, Q.new
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -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['name'])
8
+ state = state.merge(schema_name: node["name"])
9
9
  <<~TEMPLATE
10
10
  (*"#{node['name']}"
11
11
  #{treat_children(node, state).strip}
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'stepmod/utils/converters/em'
3
+ require "stepmod/utils/converters/em"
4
4
 
5
5
  module Stepmod
6
6
  module Utils
@@ -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['linkend'])
7
- linkend = node['linkend'].split('.')
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:[" + 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, StepmodExtDescription.new
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}".freeze
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, "#{content[/^\s*/]}*#{content.strip}*#{content[/\s*$/]}")
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 && sibling.text? && sibling.text =~ match
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 == 'eqn'
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 == 'eqn'
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, state = {})
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['id']
8
+ id = node["id"]
9
9
  anchor = id ? "[[#{id}]]\n" : ""
10
- title = node['caption'].to_s
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, state)}\n|===\n"
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['width']
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 'stepmod/utils/converters/synonym'
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
- child.name == 'text' && !child.text.to_s.strip.empty?
12
- end
11
+ child.name == "text" && !child.text.to_s.strip.empty?
12
+ end
13
13
  unless first_child &&
14
- node.text.split(';').length == 2 &&
15
- defined?(Stepmod::Utils::Converters::Synonym)
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 [:ol, :ul].include?(parent) # Otherwise the identation is broken
20
- ''
19
+ if %i[ol ul].include?(parent) # Otherwise the identation is broken
20
+ ""
21
21
  elsif state[:tdsinglepara]
22
- ''
23
- elsif node.text == ' ' # Regular whitespace text node
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
- text = preserve_tags(text)
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+/, '').gsub(/\n+\z/, '')
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", ' ').squeeze(' ')
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('\_', '_').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 'stepmod/utils/converters/synonym'
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(node, state = {})
10
-
9
+ def convert(_node, _state = {})
11
10
  # WARNING: <uof> tag content is deprecated
12
- return ""
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('i').each do |math_element|
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('sub').each do |math_element|
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('sup').each do |math_element|
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('ol').each do |element|
43
- element.css('li').each do |li|
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('ul').each do |element|
49
- element.css('li').each do |li|
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:\[/, '').gsub(/<\/?[uo]l>/, '')
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;", "alpha").
70
- gsub("&beta;", "beta").
71
- gsub("&gamma;", "gamma").
72
- gsub("&Gamma;", "Gamma").
73
- gsub("&delta;", "delta").
74
- gsub("&Delta;", "Delta").
75
- gsub("&epsilon;", "epsilon").
76
- gsub("&varepsilon;", "varepsilon").
77
- gsub("&zeta;", "zeta").
78
- gsub("&eta;", "eta").
79
- gsub("&theta;", "theta").
80
- gsub("&Theta;", "Theta").
81
- gsub("&vartheta;", "vartheta").
82
- gsub("&iota;", "iota").
83
- gsub("&kappa;", "kappa").
84
- gsub("&lambda;", "lambda").
85
- gsub("&Lambda;", "Lambda").
86
- gsub("&mu;", "mu").
87
- gsub("&nu;", "nu").
88
- gsub("&xi;", "xi").
89
- gsub("&Xi;", "Xi").
90
- gsub("&pi;", "pi").
91
- gsub("&Pi;", "Pi").
92
- gsub("&rho;", "rho").
93
- gsub("&beta;", "beta").
94
- gsub("&sigma;", "sigma").
95
- gsub("&Sigma;", "Sigma").
96
- gsub("&tau;", "tau").
97
- gsub("&upsilon;", "upsilon").
98
- gsub("&phi;", "phi").
99
- gsub("&Phi;", "Phi").
100
- gsub("&varphi;", "varphi").
101
- gsub("&chi;", "chi").
102
- gsub("&psi;", "psi").
103
- gsub("&Psi;", "Psi").
104
- gsub("&omega;", "omega")
105
- gsub("&#967", "χ").
106
- gsub("&#215", "×").
107
- gsub("&#931", "Σ").
108
- gsub("&#961", "ρ").
109
- gsub("&#963", "σ").
110
- gsub("&#955", "λ").
111
- gsub("&#964", "τ").
112
- gsub("&#8706", "∂").
113
- gsub("&#8804", "≤").
114
- gsub("&#8805", "≥")
70
+ x.gsub("&alpha;", "alpha")
71
+ .gsub("&beta;", "beta")
72
+ .gsub("&gamma;", "gamma")
73
+ .gsub("&Gamma;", "Gamma")
74
+ .gsub("&delta;", "delta")
75
+ .gsub("&Delta;", "Delta")
76
+ .gsub("&epsilon;", "epsilon")
77
+ .gsub("&varepsilon;", "varepsilon")
78
+ .gsub("&zeta;", "zeta")
79
+ .gsub("&eta;", "eta")
80
+ .gsub("&theta;", "theta")
81
+ .gsub("&Theta;", "Theta")
82
+ .gsub("&vartheta;", "vartheta")
83
+ .gsub("&iota;", "iota")
84
+ .gsub("&kappa;", "kappa")
85
+ .gsub("&lambda;", "lambda")
86
+ .gsub("&Lambda;", "Lambda")
87
+ .gsub("&mu;", "mu")
88
+ .gsub("&nu;", "nu")
89
+ .gsub("&xi;", "xi")
90
+ .gsub("&Xi;", "Xi")
91
+ .gsub("&pi;", "pi")
92
+ .gsub("&Pi;", "Pi")
93
+ .gsub("&rho;", "rho")
94
+ .gsub("&beta;", "beta")
95
+ .gsub("&sigma;", "sigma")
96
+ .gsub("&Sigma;", "Sigma")
97
+ .gsub("&tau;", "tau")
98
+ .gsub("&upsilon;", "upsilon")
99
+ .gsub("&phi;", "phi")
100
+ .gsub("&Phi;", "Phi")
101
+ .gsub("&varphi;", "varphi")
102
+ .gsub("&chi;", "chi")
103
+ .gsub("&psi;", "psi")
104
+ .gsub("&Psi;", "Psi")
105
+ .gsub("&omega;", "omega")
106
+ .gsub("&#967", "χ")
107
+ .gsub("&#215", "×")
108
+ .gsub("&#931", "Σ")
109
+ .gsub("&#961", "ρ")
110
+ .gsub("&#963", "σ")
111
+ .gsub("&#955", "λ")
112
+ .gsub("&#964", "τ")
113
+ .gsub("&#8706", "∂")
114
+ .gsub("&#8804", "≤")
115
+ .gsub("&#8805", "≥")
115
116
  end
116
117
 
117
118
  def html_entities_to_stem(x)
118
- x.gsub("&alpha;", "stem:[alpha]").
119
- gsub("&beta;", "stem:[beta]").
120
- gsub("&gamma;", "stem:[gamma]").
121
- gsub("&Gamma;", "stem:[Gamma]").
122
- gsub("&delta;", "stem:[delta]").
123
- gsub("&Delta;", "stem:[Delta]").
124
- gsub("&epsilon;", "stem:[epsilon]").
125
- gsub("&varepsilon;", "stem:[varepsilon]").
126
- gsub("&zeta;", "stem:[zeta]").
127
- gsub("&eta;", "stem:[eta]").
128
- gsub("&theta;", "stem:[theta]").
129
- gsub("&Theta;", "stem:[Theta]").
130
- gsub("&vartheta;", "stem:[vartheta]").
131
- gsub("&iota;", "stem:[iota]").
132
- gsub("&kappa;", "stem:[kappa]").
133
- gsub("&lambda;", "stem:[lambda]").
134
- gsub("&Lambda;", "stem:[Lambda]").
135
- gsub("&mu;", "stem:[mu]").
136
- gsub("&nu;", "stem:[nu]").
137
- gsub("&xi;", "stem:[xi]").
138
- gsub("&Xi;", "stem:[Xi]").
139
- gsub("&pi;", "stem:[pi]").
140
- gsub("&Pi;", "stem:[Pi]").
141
- gsub("&rho;", "stem:[rho]").
142
- gsub("&beta;", "stem:[beta]").
143
- gsub("&sigma;", "stem:[sigma]").
144
- gsub("&Sigma;", "stem:[Sigma]").
145
- gsub("&tau;", "stem:[tau]").
146
- gsub("&upsilon;", "stem:[upsilon]").
147
- gsub("&phi;", "stem:[phi]").
148
- gsub("&Phi;", "stem:[Phi]").
149
- gsub("&varphi;", "stem:[varphi]").
150
- gsub("&chi;", "stem:[chi]").
151
- gsub("&psi;", "stem:[psi]").
152
- gsub("&Psi;", "stem:[Psi]").
153
- gsub("&omega;", "stem:[omega]")
119
+ x.gsub("&alpha;", "stem:[alpha]")
120
+ .gsub("&beta;", "stem:[beta]")
121
+ .gsub("&gamma;", "stem:[gamma]")
122
+ .gsub("&Gamma;", "stem:[Gamma]")
123
+ .gsub("&delta;", "stem:[delta]")
124
+ .gsub("&Delta;", "stem:[Delta]")
125
+ .gsub("&epsilon;", "stem:[epsilon]")
126
+ .gsub("&varepsilon;", "stem:[varepsilon]")
127
+ .gsub("&zeta;", "stem:[zeta]")
128
+ .gsub("&eta;", "stem:[eta]")
129
+ .gsub("&theta;", "stem:[theta]")
130
+ .gsub("&Theta;", "stem:[Theta]")
131
+ .gsub("&vartheta;", "stem:[vartheta]")
132
+ .gsub("&iota;", "stem:[iota]")
133
+ .gsub("&kappa;", "stem:[kappa]")
134
+ .gsub("&lambda;", "stem:[lambda]")
135
+ .gsub("&Lambda;", "stem:[Lambda]")
136
+ .gsub("&mu;", "stem:[mu]")
137
+ .gsub("&nu;", "stem:[nu]")
138
+ .gsub("&xi;", "stem:[xi]")
139
+ .gsub("&Xi;", "stem:[Xi]")
140
+ .gsub("&pi;", "stem:[pi]")
141
+ .gsub("&Pi;", "stem:[Pi]")
142
+ .gsub("&rho;", "stem:[rho]")
143
+ .gsub("&beta;", "stem:[beta]")
144
+ .gsub("&sigma;", "stem:[sigma]")
145
+ .gsub("&Sigma;", "stem:[Sigma]")
146
+ .gsub("&tau;", "stem:[tau]")
147
+ .gsub("&upsilon;", "stem:[upsilon]")
148
+ .gsub("&phi;", "stem:[phi]")
149
+ .gsub("&Phi;", "stem:[Phi]")
150
+ .gsub("&varphi;", "stem:[varphi]")
151
+ .gsub("&chi;", "stem:[chi]")
152
+ .gsub("&psi;", "stem:[psi]")
153
+ .gsub("&Psi;", "stem:[Psi]")
154
+ .gsub("&omega;", "stem:[omega]")
154
155
  end
155
156
  end
156
157
  end