Zapisz naiwny klasyfikator Bayesa w NLTK

Jestem nieco zmieszany, jeśli chodzi o to, jak uratować wyszkolonego klasyfikatora. Podobnie jak w przypadku ponownego szkolenia klasyfikatora za każdym razem, gdy chcę go użyć, jest to oczywiście bardzo złe i powolne, jak mogę go zapisać i załadować ponownie, gdy będę tego potrzebować? Kod jest poniżej, z góry dziękuję za pomoc. Używam Pythona z NLTK Naive Bayes Classifier.

classifier = nltk.NaiveBayesClassifier.train(training_set)
# look inside the classifier train method in the source code of the NLTK library

def train(labeled_featuresets, estimator=nltk.probability.ELEProbDist):
    # Create the P(label) distribution
    label_probdist = estimator(label_freqdist)
    # Create the P(fval|label, fname) distribution
    feature_probdist = {}
    return NaiveBayesClassifier(label_probdist, feature_probdist)

questionAnswers(3)

yourAnswerToTheQuestion