7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/factbook/normalize.rb', line 7
def normalize_category( text )
text = text.strip
text = text.sub( /:+\z/, '' ) text = text.strip
text = 'note' if text == 'ntoe'
text = 'investment in fixed capital' if text == 'investment if fixed capital'
text = 'lowest point' if text == 'Lowest point'
text = 'chief of state' if text == 'Chief of state'
text = 'signed, but not ratified' if text == 'signed but not ratified'
text = 'vectorborne diseases' if text == 'vectorborne disease'
text = 'water contact disease' if text == 'water contact diseases'
text = 'food or waterborne diseases' if text == 'food or waterborne disease'
text = 'geographic coordinates' if text == 'geographical coordinates'
text = 'note' if text == 'notes'
text = 'refugees (country of origin)' if text == 'refugees (countries of origin)'
text = 'border countries' if text.start_with?( 'border countries')
text
end
|