c++ - How to design Classifier interface, different classifiers and data storage? -


i have class:

class textclassifier { public:   void init(const std::string& file);    texttype classify(const std::string& text) const;  private:   hashmap<...> data_; } 

function init loads statistics file hashmap , function classify makes naive bayes classification.

i think idea make refactoring, user of class can provide different classifiers , different types of datastorage.

but little stuck because not @ design. please suggest designs here? suggest literature on topic? thanks!

maybe should have @ strategy pattern: http://en.wikipedia.org/wiki/strategy_pattern


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -