Skip to content

Commit

Permalink
add libs docs
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 19, 2023
1 parent 4f26a61 commit ba0ac53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@
// - Config.MinMsgLen defines the minimum message length for spam checks. Messages shorter
// than this threshold are ignored. A negative value or zero deactivates this check.
//
// - Config.MinSpamProbability defines minimum spam probability to consider a message spam with classifier, if 0 - ignored
//
// - Config.FirstMessageOnly specifies whether only the first message from a given userID should
// be checked.
//
// - Config.FirstMessagesCount the number of first messages to check for spam
//
// - Config.CasAPI specifies the URL of the CAS API to use for spam detection. If this is empty, the
// detector will not use the CAS API checks.
//
Expand All @@ -41,4 +45,6 @@
// spam and ham samples on the fly. Those methods are thread-safe and can be called concurrently.
// To call them Detector.WithSpamUpdater and Detector.WithHamUpdater methods should be used first to provide
// user-defined structs that implement the SampleUpdater interface.
//
// The user can also add (lib.AddApprovedUsers) and remove (lib.RemoveApprovedUsers) users to/from the list of approved user ids.
package lib

0 comments on commit ba0ac53

Please sign in to comment.