@@ -22,6 +22,37 @@ def convert_location(input)
2222 input
2323 end
2424
25+ def parse_audience ( description )
26+ audience_mapping = {
27+ 'post-docs' : 'researchers' ,
28+ "PhD's candidate" : 'researchers' ,
29+ 'PhD student' : 'researchers' ,
30+ 'principal investigator' : 'researchers' ,
31+ 'professor' : 'researchers' ,
32+ 'scientist' : 'researchers' ,
33+ 'library staff' : 'research support staff' ,
34+ 'research librarian' : 'research support staff' ,
35+ 'information specialist' : 'research support staff' ,
36+ 'archivist' : 'research support staff' ,
37+ 'repository manager' : 'research support staff' ,
38+ 'data steward' : 'research support staff' ,
39+ 'data manager' : 'research support staff' ,
40+ 'data professional' : 'research support staff' ,
41+ 'data engineer' : 'research support staff' ,
42+ 'software engineer' : 'research support staff' ,
43+ 'data librarian' : 'research support staff' ,
44+ 'bachelor' : 'students' ,
45+ 'master' : 'students' ,
46+ 'teacher' : 'trainers' ,
47+ 'coaches' : 'trainers' ,
48+ 'educator' : 'trainers' ,
49+ }
50+ audience_mapping
51+ . select { |key , val | description . downcase . include? ( key . to_s . downcase ) }
52+ . values
53+ . uniq
54+ end
55+
2556 def parse_dates ( input , timezone = nil )
2657 Time . use_zone ( timezone ) do
2758 # try to split on obvious interval markers
0 commit comments