move filter stuff into separate source file

master
Carlo Strub 7 years ago
parent eb24f37ae7
commit 2d39b89243

@ -0,0 +1,17 @@
package main
import (
"github.com/jbrukh/bayesian"
)
const (
// good is the class of good mails that are not supposed to be Spam
good bayesian.Class = "Good"
// junk is the class of Spam mails
junk bayesian.Class = "Junk"
)
// Classifiers contains the classifiers for mail subjects and bodies
type Classifiers struct {
Subject, Body *bayesian.Classifier
}

@ -5,15 +5,6 @@ import (
"fmt"
"log"
"os"
"github.com/jbrukh/bayesian"
)
const (
// good is the class of good mails that are not supposed to be Spam
good bayesian.Class = "Good"
// junk is the class of Spam mails
junk bayesian.Class = "Junk"
)
var (
@ -21,11 +12,6 @@ var (
Processed map[string]bool
)
// Classifiers contains the classifiers for mail subjects and bodies
type Classifiers struct {
Subject, Body *bayesian.Classifier
}
func main() {
// Get the Maildir to be handled
wd, err := os.Getwd()

Loading…
Cancel
Save