Camel.JunkFilter¶
- Implementations:
None
Methods¶
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class Camel.JunkFilter¶
- Bases:
- Structure:
New in version 3.2.
- classify(message, cancellable)¶
- Parameters:
message (
Camel.MimeMessage
) – aCamel.MimeMessage
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the junk status determined by self
- Return type:
Classifies message as junk, not junk or inconclusive.
If an error occurs, the function sets error and returns
Camel.JunkStatus.ERROR
.New in version 3.2.
- learn_junk(message, cancellable)¶
- Parameters:
message (
Camel.MimeMessage
) – aCamel.MimeMessage
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
if message was successfully classified- Return type:
Instructs self to classify message as junk. If using an adaptive junk filtering algorithm, explicitly marking message as junk will influence the classification of future messages.
If an error occurs, the function sets error and returns
False
.New in version 3.2.
- learn_not_junk(message, cancellable)¶
- Parameters:
message (
Camel.MimeMessage
) – aCamel.MimeMessage
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
if message was successfully classified- Return type:
Instructs self to classify message as not junk. If using an adaptive junk filtering algorithm, explicitly marking message as not junk will influence the classification of future messages.
If an error occurs, the function sets error and returns
False
.New in version 3.2.
- synchronize(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
if self was successfully synchronized- Return type:
Instructs self to flush any in-memory caches to disk, if applicable. When filtering many messages, delaying this step until all messages have been classified can improve performance.
If an error occurs, the function sets error and returns
False
.New in version 3.2.
- do_classify(message, cancellable) virtual¶
- Parameters:
message (
Camel.MimeMessage
) – aCamel.MimeMessage
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
the junk status determined by junk_filter
- Return type:
Classifies message as junk, not junk or inconclusive.
If an error occurs, the function sets error and returns
Camel.JunkStatus.ERROR
.New in version 3.2.
- do_learn_junk(message, cancellable) virtual¶
- Parameters:
message (
Camel.MimeMessage
) – aCamel.MimeMessage
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
True
if message was successfully classified- Return type:
Instructs junk_filter to classify message as junk. If using an adaptive junk filtering algorithm, explicitly marking message as junk will influence the classification of future messages.
If an error occurs, the function sets error and returns
False
.New in version 3.2.
- do_learn_not_junk(message, cancellable) virtual¶
- Parameters:
message (
Camel.MimeMessage
) – aCamel.MimeMessage
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
True
if message was successfully classified- Return type:
Instructs junk_filter to classify message as not junk. If using an adaptive junk filtering algorithm, explicitly marking message as not junk will influence the classification of future messages.
If an error occurs, the function sets error and returns
False
.New in version 3.2.
- do_synchronize(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
True
if junk_filter was successfully synchronized- Return type:
Instructs junk_filter to flush any in-memory caches to disk, if applicable. When filtering many messages, delaying this step until all messages have been classified can improve performance.
If an error occurs, the function sets error and returns
False
.New in version 3.2.