From 37498f130e673dcb3052c029c0407ffa483dda8a Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 31 Mar 2011 17:39:10 +0800 Subject: refine ngram header --- src/storage/ngram.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/storage/ngram.h b/src/storage/ngram.h index 5cc4ec5..c4fdf7b 100644 --- a/src/storage/ngram.h +++ b/src/storage/ngram.h @@ -62,16 +62,16 @@ public: */ bool set_freq(/* in */ phrase_token_t token, guint32 freq); - - /* set_total_freq method - * used in user bigram table - */ - bool set_total_freq(guint32 m_total); /* get_total_freq method * used in user bigram table */ bool get_total_freq(guint32 & m_total); + + /* set_total_freq method + * used in user bigram table + */ + bool set_total_freq(guint32 m_total); /* prune one method * only used in training @@ -108,10 +108,17 @@ public: /* when with training systemdb is NULL, only user_gram */ bool attach(const char * systemfile, const char * userfile); - bool load(phrase_token_t index, SingleGram * & system_gram, SingleGram * & user_gram); - bool store(phrase_token_t index, SingleGram * user_gram); + /* load/store one single gram */ + bool load(/* in */ phrase_token_t index, + /* out */ SingleGram * & system_gram, + /* out */ SingleGram * & user_gram); + + bool store(/* in */ phrase_token_t index, + /* in */ SingleGram * user_gram); + /* array of phrase_token_t items, for parameter estimation. */ - bool get_all_items(GArray * system, GArray * user); + bool get_all_items(/* out */ GArray * system, + /* out */ GArray * user); }; }; -- cgit