File: classification.rst

package info (click to toggle)
afew 0.0%2Bgit2016.02.29.b19a88f-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 292 kB
  • sloc: python: 1,315; makefile: 107
file content (57 lines) | stat: -rw-r--r-- 1,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Classification
==============

In Action
---------

Let's train on an existing tag `spam`:

.. code-block:: sh

    $ afew --learn spam -- tag:spam

Let's build the reference category. This is important to reduce the
false positive rate. This may take a while...

.. code-block:: sh

    $ afew --update-reference

And now let's create a new tag from an arbitrary query result:

.. code-block:: sh

    $ afew -vv --learn sourceforge -- sourceforge

Let's see how good the classification is:

.. code-block:: sh

    $ afew --classify -- tag:inbox and not tag:killed
    Sergio López <slpml@sinrega.org> (2011-10-08) (bug-hurd inbox lists unread) --> no match
    Patrick Totzke <reply+i-1840934-9a702d09342dca2b120126b26b008d0deea1731e@reply.github.com> (2011-10-08) (alot inbox lists) --> alot
    [...]

As soon as you trained some categories, afew will automatically
tag your new mails using the classifier. If you want to disable this
feature, either use the `--enable-filters` option to override the default
set of filters or remove the files in your afew state dir:

.. code-block:: sh

    $ ls ~/.local/share/afew/categories
    alot juggling  reference_category  sourceforge  spam

You need to update the category files periodically. I'd suggest to run

.. code-block:: sh

    $ afew --update

on a weekly and

.. code-block:: sh

    $ afew --update-reference

on a monthly basis.