Sha256: bd953beccbaaa8d1576e5d77bda04b35a59cc6e47d3d427a239c593ad7885ba3

Contents?: true

Size: 562 Bytes

Versions: 12

Compression:

Stored size: 562 Bytes

Contents

module Gluttonberg
  module Content
    require 'despamilator/filter'

    module DespamilatorFilter

      class LongWords < Despamilator::Filter

        def name
          'Long Words'
        end

        def description
          'Detects long and unbroken strings'
        end

        def parse subject
          subject.text.without_uris.words.each do |word|
            subject.register_match!({
              :score => 0.1, :filter => self
            }) if word.length > 20
          end
        end

      end

    end
  end #Content
end #Gluttonberg

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gluttonberg-core-3.0.2 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-3.0.1 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-3.0.0 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.6.4 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.6.3 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.6.2 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.6.1 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.6.0 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.5.9 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.5.8 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.5.7 lib/gluttonberg/content/despamilator/filter/long_words.rb
gluttonberg-core-2.5.6 lib/gluttonberg/content/despamilator/filter/long_words.rb