/* * ===================================================================================== * * Filename: trainCorpus.h * * Description: trainCorpus class definition. * * Version: 1.0 * Created: 09/08/2018 * Revision: none * Compiler: gcc * * Author: zhulin, shzhulin3@jd.com * Company: JD.com, Inc. * * ===================================================================================== */ #ifndef __TRAIN_CORPUS_H__ #define __TRAIN_CORPUS_H__ #include #include #include using namespace std; class TrainCorpus { public: TrainCorpus(); ~TrainCorpus(){} bool Init(string path); double MinEmit() { return min_emit; } map > trans_dict; map > emit_dict; map start_dict; private: map count_dict; uint32_t line_num; double min_emit; }; #endif