Despamilator (Despamilator v2.1.5)

Copy Markdown View Source

Plugin-based spam scanner. Scores text against many small heuristic filters and accumulates a total score. A score of 1.0+ is typically considered spam.

iex> result = Despamilator.scan("some text with an <h2> tag qthhg")
iex> result.score > 0
true

Each match is a map: %{filter: module, score: float}.

Summary

Functions

All registered filter modules. Override via :despamilator_elixir, :filters config.

Returns the canonical GTUBS test string used to verify the scanner is alive.

Convenience accessor — returns just the matches list.

Runs every registered filter against text and returns the resulting Despamilator.Subject containing :score and :matches.

Convenience accessor — returns just the total score.

Functions

filters()

All registered filter modules. Override via :despamilator_elixir, :filters config.

gtubs_test_string()

Returns the canonical GTUBS test string used to verify the scanner is alive.

matches(text)

Convenience accessor — returns just the matches list.

scan(text)

Runs every registered filter against text and returns the resulting Despamilator.Subject containing :score and :matches.

score(text)

Convenience accessor — returns just the total score.