Skip to content Skip to sidebar Skip to footer

Nltk Naive Bayesian Classifier Memory Issue

my first post here! I have problems using the nltk NaiveBayesClassifier. I have a training set of 7000 items. Each training item has a description of 2 or 3 worlds and a code. I wo

Solution 1:

Use nltk.classify.apply_features which returns an object that acts like a list but does not store all the feature sets in memory.

from nltk.classify import apply_features

More Information and a Example here

You are loading the file anyway into the memory, you will need to use some form of lazy loading method. Which will load as per need basis. Consider looking into this

Post a Comment for "Nltk Naive Bayesian Classifier Memory Issue"