Class: Wikipedia::VandalismDetection::Features::BiasedImpact
- Inherits:
-
ImpactBase
- Object
- Base
- ImpactBase
- Wikipedia::VandalismDetection::Features::BiasedImpact
- Defined in:
- lib/wikipedia/vandalism_detection/features/biased_impact.rb
Overview
This feature computes the percentage by which the edit increases the number of biased words in the text.
Instance Method Summary collapse
Methods inherited from ImpactBase
Methods inherited from Base
Instance Method Details
permalink #calculate(edit) ⇒ Object
[View source]
11 12 13 14 15 16 17 18 |
# File 'lib/wikipedia/vandalism_detection/features/biased_impact.rb', line 11 def calculate(edit) super old_text = edit.old_revision.text.clean new_text = edit.new_revision.text.clean impact(old_text, new_text, WordLists::BIASED) end |