Class: Wikipedia::VandalismDetection::Features::Anonymity

Inherits:
Base
  • Object
show all
Defined in:
lib/wikipedia/vandalism_detection/features/anonymity.rb

Overview

This feature describes whether the contributor of the new revision is an anonymous or registered Wikipedia user.

Instance Method Summary collapse

Methods inherited from Base

#count

Instance Method Details

#calculate(edit) ⇒ Object



11
12
13
14
15
# File 'lib/wikipedia/vandalism_detection/features/anonymity.rb', line 11

def calculate(edit)
  super

  edit.new_revision.anonymous_contributor? ? 0 : 1
end