Class: Wikipedia::VandalismDetection::Features::WordsIncrement
- Defined in:
- lib/wikipedia/vandalism_detection/features/words_increment.rb
Overview
This feature computes the increment of the edit’s revisions words.
Instance Method Summary collapse
-
#calculate(edit) ⇒ Object
computation: |inserted| - |removed|.
Methods inherited from Base
Instance Method Details
#calculate(edit) ⇒ Object
computation: |inserted| - |removed|
11 12 13 14 15 16 17 18 |
# File 'lib/wikipedia/vandalism_detection/features/words_increment.rb', line 11 def calculate(edit) super inserted_count = edit.inserted_words.count removed_count = edit.removed_words.count inserted_count - removed_count end |