diff options
Diffstat (limited to 'src/storage/flexible_ngram_bdb.h')
-rw-r--r-- | src/storage/flexible_ngram_bdb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/storage/flexible_ngram_bdb.h b/src/storage/flexible_ngram_bdb.h index fd1e2ed..27bb7f8 100644 --- a/src/storage/flexible_ngram_bdb.h +++ b/src/storage/flexible_ngram_bdb.h @@ -157,13 +157,15 @@ public: * FlexibleBigram::load: * @index: the previous token in the flexible bi-gram. * @single_gram: the single gram of the previous token. + * @copy: whether copy content to the single gram. * @returns: whether the load operation is successful. * * Load the single gram of the previous token. * */ bool load(phrase_token_t index, - FlexibleSingleGram<ArrayHeader, ArrayItem> * & single_gram){ + FlexibleSingleGram<ArrayHeader, ArrayItem> * & single_gram, + bool copy=false){ single_gram = NULL; if ( !m_db ) return false; @@ -180,7 +182,7 @@ public: return false; single_gram = new FlexibleSingleGram<ArrayHeader, ArrayItem> - (db_data.data, db_data.size); + (db_data.data, db_data.size, copy); return true; } |