summaryrefslogtreecommitdiffstats
path: root/src/storage/ngram.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-03-31 17:39:10 +0800
committerPeng Wu <alexepico@gmail.com>2011-03-31 17:39:10 +0800
commit37498f130e673dcb3052c029c0407ffa483dda8a (patch)
tree9d7bf837a870f659c6dc4b8f0401630174cf8d61 /src/storage/ngram.h
parent97a6a4e00856fceb1a72e163ec54cfa94c04733e (diff)
downloadlibpinyin-37498f130e673dcb3052c029c0407ffa483dda8a.tar.gz
libpinyin-37498f130e673dcb3052c029c0407ffa483dda8a.tar.xz
libpinyin-37498f130e673dcb3052c029c0407ffa483dda8a.zip
refine ngram header
Diffstat (limited to 'src/storage/ngram.h')
-rw-r--r--src/storage/ngram.h23
1 files changed, 15 insertions, 8 deletions
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);
};
};