/* init phrase index */
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
/* init bi-gram */
largetable.load(options, chunk, NULL);
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
Bigram system_bigram;
#ifndef TESTS_HELPER_H
#define TESTS_HELPER_H
-static bool init_phrase_index(FacadePhraseIndex * phrase_index){
+static bool load_phrase_index(FacadePhraseIndex * phrase_index){
MemoryChunk * chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
const char * bin_file = pinyin_phrase_files[i];
/* init phrase index */
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
/* init bi-gram */
MemoryChunk * chunk = NULL;
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
Bigram bigram;
phrases.load(chunk);
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
Bigram bigram;
int main(int argc, char * argv[]){
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
Bigram bigram;
largetable.load(options, chunk, NULL);
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
FacadePhraseTable phrases;
}
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER);
phrases.load(chunk);
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
Bigram bigram;
MemoryChunk * chunk = NULL;
FacadePhraseIndex phrase_index;
- if (!init_phrase_index(&phrase_index))
+ if (!load_phrase_index(&phrase_index))
exit(ENOENT);
/* Note: please increase the value when corpus size becomes larger.
#ifndef UTILS_HELPER_H
#define UTILS_HELPER_H
-static bool init_phrase_index(FacadePhraseIndex * phrase_index) {
+static bool load_phrase_index(FacadePhraseIndex * phrase_index) {
MemoryChunk * chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
const char * bin_file = pinyin_phrase_files[i];