diff options
author | Peng Wu <alexepico@gmail.com> | 2011-03-31 10:57:05 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-03-31 11:33:21 +0800 |
commit | 5c653c52b95686476f0e86ec1ae5cc658ae27a55 (patch) | |
tree | a8726d089b57e35ae3fa0d079191ab5ec8bfac4e /src/storage | |
parent | 71e1bb340401ef63aa01245429487d90b58664ac (diff) | |
download | libpinyin-5c653c52b95686476f0e86ec1ae5cc658ae27a55.tar.gz libpinyin-5c653c52b95686476f0e86ec1ae5cc658ae27a55.tar.xz libpinyin-5c653c52b95686476f0e86ec1ae5cc658ae27a55.zip |
refine ngram header
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/ngram.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/storage/ngram.h b/src/storage/ngram.h index 42f7aaf..1afda82 100644 --- a/src/storage/ngram.h +++ b/src/storage/ngram.h @@ -83,14 +83,6 @@ class Bigram{ private: DB * m_system; DB * m_user; -public: - Bigram(){ - m_system = NULL; m_user = NULL; - } - - ~Bigram(){ - reset(); - } void reset(){ if ( m_system ){ @@ -102,7 +94,16 @@ public: m_user = NULL; } } - + +public: + Bigram(){ + m_system = NULL; m_user = NULL; + } + + ~Bigram(){ + reset(); + } + /* attach system and user bi-gram */ /* when with training systemdb is NULL, only user_gram */ bool attach(const char * systemfile, const char * userfile); |