113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
# File 'lib/biodiversity/parser/gnparser.rb', line 113
def parse_output(output)
parsed = CSV.new(output).first
{
id: get_csv_value(parsed, 'Id'),
verbatim: get_csv_value(parsed, 'Verbatim'),
cardinality: get_csv_value(parsed, 'Cardinality'),
canonical: {
stemmed: get_csv_value(parsed, 'CanonicalStem'),
simple: get_csv_value(parsed, 'CanonicalSimple'),
full: get_csv_value(parsed, 'CanonicalFull')
},
authorship: get_csv_value(parsed, 'Authorship'),
year: get_csv_value(parsed, 'Year'),
quality: get_csv_value(parsed, 'Quality')&.to_i
}
end
|