Sha256: 17a02f00ebb9a15a40c333eba41b7065ccf3a85e727a5f7e6ef35f32f16b091b
Contents?: true
Size: 586 Bytes
Versions: 12
Compression:
Stored size: 586 Bytes
Contents
module Gluttonberg module Content module DespamilatorFilter class MixedCase < Despamilator::Filter def name 'Mixed Case String' end def description 'Detects mixed case strings.' end def parse subject text = subject.text.without_uris count = text.remove_and_count!(/[a-z][A-Z]/) count += text.remove_and_count!(/[a-z][A-Z][a-z]/) subject.register_match!({:score => 0.1 * count, :filter => self}) if count > 0 end end end end #Content end #Gluttonberg
Version data entries
12 entries across 12 versions & 1 rubygems