summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-10-31 13:23:28 +0800
committerPeng Wu <alexepico@gmail.com>2012-10-31 13:23:28 +0800
commit96bddf9da58eb418dfea8ed9aff539f33c558b69 (patch)
treef8c118b7943da06991141f5b66c1209bf4d7f0ab
parentc315a6e31dcbd42d8151e250bed01edcf00932a4 (diff)
downloadlibpinyin-96bddf9da58eb418dfea8ed9aff539f33c558b69.tar.gz
libpinyin-96bddf9da58eb418dfea8ed9aff539f33c558b69.tar.xz
libpinyin-96bddf9da58eb418dfea8ed9aff539f33c558b69.zip
add comments
-rw-r--r--src/storage/ngram.h37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/storage/ngram.h b/src/storage/ngram.h
index 8f534ce..e4045a9 100644
--- a/src/storage/ngram.h
+++ b/src/storage/ngram.h
@@ -151,8 +151,24 @@ public:
*/
bool set_total_freq(guint32 total);
+ /**
+ * SingleGram::get_length:
+ * @returns: the number of items in this single gram.
+ *
+ * Get the number of items in this single gram.
+ *
+ */
guint32 get_length();
+ /**
+ * SingleGram::mask_out:
+ * @mask: the mask.
+ * @value: the value.
+ * @returns: the number of removed items.
+ *
+ * Mask out the matched items in this single gram.
+ *
+ */
guint32 mask_out(phrase_token_t mask, phrase_token_t value);
/**
@@ -242,7 +258,7 @@ public:
* @single_gram: the single gram of the previous token.
* @returns: whether the load operation is successful.
*
- * Load the single gram of the previous token into the SingleGram class.
+ * Load the single gram of the previous token.
*
*/
bool load(/* in */ phrase_token_t index,
@@ -254,12 +270,20 @@ public:
* @single_gram: the single gram of the previous token.
* @returns: whether the store operation is successful.
*
- * Store the single gram of the previous token from the SingleGram class.
+ * Store the single gram of the previous token.
*
*/
bool store(/* in */ phrase_token_t index,
/* in */ SingleGram * single_gram);
+ /**
+ * Bigram::remove:
+ * @index: the previous token in the bi-gram.
+ * @returns: whether the remove operation is successful.
+ *
+ * Remove the single gram of the previous token.
+ *
+ */
bool remove(/* in */ phrase_token_t index);
/**
@@ -272,6 +296,15 @@ public:
*/
bool get_all_items(/* out */ GArray * items);
+ /**
+ * Bigram::mask_out:
+ * @mask: the mask.
+ * @value: the value.
+ * @returns: whether the mask out operation is successful.
+ *
+ * Mask out the matched items.
+ *
+ */
bool mask_out(phrase_token_t mask, phrase_token_t value);
};