diff options
-rwxr-xr-x | src/include/novel_types.h | 9 | ||||
-rw-r--r-- | src/storage/ngram.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/include/novel_types.h b/src/include/novel_types.h index 9265cfe..2d31039 100755 --- a/src/include/novel_types.h +++ b/src/include/novel_types.h @@ -103,7 +103,14 @@ struct BigramPhraseItem{ gfloat m_freq; /* P(W2|W1) */ }; -typedef GArray * BigramPhraseArray; /* Array of HighLevelPhraseItem */ +struct BigramPhraseItemWithCount{ + phrase_token_t m_token; + guint32 m_cout; + gfloat m_freq; /* P(W2|W1) */ +}; + +typedef GArray * BigramPhraseArray; /* Array of BigramPhraseItem */ +typedef GArray * BigramPhraseWithCountArray; /* Array of BigramPhraseItemWithCount */ /* * n-gram Definition diff --git a/src/storage/ngram.h b/src/storage/ngram.h index 7a723cd..42f7aaf 100644 --- a/src/storage/ngram.h +++ b/src/storage/ngram.h @@ -47,6 +47,9 @@ private: public: /* Null Constructor */ SingleGram(); + /* retrieve all items */ + bool retrieve_all(/* out */ BigramPhraseWithCountArray array); + /* search method */ /* the array result contains many items */ bool search(/* in */ PhraseIndexRange * range, |