58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/stepmod/utils/concept.rb', line 58
def definition_designation(definition_xml)
alts = definition_xml.xpath(".//synonym").map(&:text) +
definition_xml.xpath(".//def/p").map(&:text).reject do |text|
text.length > 20
end
term = Stepmod::Utils::Converters::Term
.new
.convert(
definition_xml.xpath(".//term").first
)
designations = [
{ "designation" => term[4..-1], "type" => "expression", "normative_status" => "preferred" },
]
alts.each do |alt|
designations << { "designation" => alt, "type" => "expression" }
end
designations
end
|