2
3
4
5
6
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
40
41
42
43
44
45
46
47
48
|
# File 'lib/wikidata/diff/comment_analyzer.rb', line 2
def self.()
phrases = {
'merge_to': 0,
'merge_from': 0,
'redirect': 0,
'undo': 0,
'restore': 0,
'clear_item': 0,
'create_item': 0,
}
if .nil?
return phrases
end
if .include?('wbmergeitems-from')
phrases[:merge_from] = 1
end
if .include?('wbmergeitems-to')
phrases[:merge_to] = 1
end
if .include?('wbcreateredirect')
phrases[:redirect] = 1
end
if .include?('undo:')
phrases[:undo] = 1
end
if .include?('restore:')
phrases[:restore] = 1
end
if .include?('wbeditentity-override')
phrases[:clear_item] = 1
end
if .include?('wbeditentity-create')
phrases[:create_item] = 1
end
return phrases
end
|