summaryrefslogtreecommitdiffstats
path: root/src/storage/ngram.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/ngram.h')
-rw-r--r--src/storage/ngram.h19
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);