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
Post a Comment