summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/training/estimate_interpolation.cpp8
-rw-r--r--utils/training/estimate_k_mixture_model.cpp4
-rw-r--r--utils/training/eval_correction_rate.cpp12
-rw-r--r--utils/training/export_k_mixture_model.cpp4
-rw-r--r--utils/training/gen_deleted_ngram.cpp4
-rw-r--r--utils/training/gen_k_mixture_model.cpp2
-rw-r--r--utils/training/gen_ngram.cpp12
-rw-r--r--utils/training/gen_unigram.cpp8
-rw-r--r--utils/training/import_k_mixture_model.cpp2
9 files changed, 28 insertions, 28 deletions
diff --git a/utils/training/estimate_interpolation.cpp b/utils/training/estimate_interpolation.cpp
index 426214e..0dc1542 100644
--- a/utils/training/estimate_interpolation.cpp
+++ b/utils/training/estimate_interpolation.cpp
@@ -93,19 +93,19 @@ int main(int argc, char * argv[]){
//gb_char binary file
MemoryChunk * chunk = new MemoryChunk;
- chunk->load("../../data/gb_char.bin");
+ chunk->load("gb_char.bin");
phrase_index.load(1, chunk);
//gbk_char binary file
chunk = new MemoryChunk;
- chunk->load("../../data/gbk_char.bin");
+ chunk->load("gbk_char.bin");
phrase_index.load(2, chunk);
Bigram bigram;
- bigram.attach("../../data/bigram.db", ATTACH_READONLY);
+ bigram.attach("bigram.db", ATTACH_READONLY);
Bigram deleted_bigram;
- deleted_bigram.attach("../../data/deleted_bigram.db", ATTACH_READONLY);
+ deleted_bigram.attach("deleted_bigram.db", ATTACH_READONLY);
GArray * deleted_items = g_array_new(FALSE, FALSE, sizeof(phrase_token_t));
deleted_bigram.get_all_items(deleted_items);
diff --git a/utils/training/estimate_k_mixture_model.cpp b/utils/training/estimate_k_mixture_model.cpp
index b0397f2..aa2111e 100644
--- a/utils/training/estimate_k_mixture_model.cpp
+++ b/utils/training/estimate_k_mixture_model.cpp
@@ -92,8 +92,8 @@ parameter_t compute_interpolation(KMixtureModelSingleGram * deleted_bigram,
int main(int argc, char * argv[]){
int i = 1;
- const char * bigram_filename = "../../data/k_mixture_model_ngram.db";
- const char * deleted_bigram_filename = "../../data/k_mixture_model_deleted_ngram.db";
+ const char * bigram_filename = "k_mixture_model_ngram.db";
+ const char * deleted_bigram_filename = "k_mixture_model_deleted_ngram.db";
setlocale(LC_ALL, "");
while ( i < argc ){
diff --git a/utils/training/eval_correction_rate.cpp b/utils/training/eval_correction_rate.cpp
index 2db01c6..d658d4b 100644
--- a/utils/training/eval_correction_rate.cpp
+++ b/utils/training/eval_correction_rate.cpp
@@ -105,30 +105,30 @@ bool do_one_test(PinyinLookup * pinyin_lookup,
}
int main(int argc, char * argv[]){
- const char * evals_text = "../../data/evals.text";
+ const char * evals_text = "evals.text";
PinyinCustomSettings custom;
PinyinLargeTable largetable(&custom);
MemoryChunk * new_chunk = new MemoryChunk;
- new_chunk->load("../../data/pinyin_index.bin");
+ new_chunk->load("pinyin_index.bin");
largetable.load(new_chunk);
FacadePhraseIndex phrase_index;
new_chunk = new MemoryChunk;
- new_chunk->load("../../data/gb_char.bin");
+ new_chunk->load("gb_char.bin");
phrase_index.load(1, new_chunk);
new_chunk = new MemoryChunk;
- new_chunk->load("../../data/gbk_char.bin");
+ new_chunk->load("gbk_char.bin");
phrase_index.load(2, new_chunk);
PhraseLargeTable phrases;
new_chunk = new MemoryChunk;
- new_chunk->load("../../data/phrase_index.bin");
+ new_chunk->load("phrase_index.bin");
phrases.load(new_chunk);
Bigram system_bigram;
- system_bigram.attach("../../data/bigram.db", ATTACH_READONLY);
+ system_bigram.attach("bigram.db", ATTACH_READONLY);
Bigram user_bigram;
user_bigram.attach(NULL, ATTACH_CREATE|ATTACH_READWRITE);
diff --git a/utils/training/export_k_mixture_model.cpp b/utils/training/export_k_mixture_model.cpp
index 87a4577..fc91088 100644
--- a/utils/training/export_k_mixture_model.cpp
+++ b/utils/training/export_k_mixture_model.cpp
@@ -128,12 +128,12 @@ int main(int argc, char * argv[]){
//gb_char binary file
MemoryChunk * chunk = new MemoryChunk;
- chunk->load("../../data/gb_char.bin");
+ chunk->load("gb_char.bin");
phrase_index.load(1, chunk);
//gbk_char binary file
chunk = new MemoryChunk;
- chunk->load("../../data/gbk_char.bin");
+ chunk->load("gbk_char.bin");
phrase_index.load(2, chunk);
KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER);
diff --git a/utils/training/gen_deleted_ngram.cpp b/utils/training/gen_deleted_ngram.cpp
index cce153b..54074c2 100644
--- a/utils/training/gen_deleted_ngram.cpp
+++ b/utils/training/gen_deleted_ngram.cpp
@@ -36,7 +36,7 @@ void print_help(){
int main(int argc, char * argv[]){
int i = 1;
bool train_pi_gram = true;
- const char * bigram_filename = "../../data/deleted_bigram.db";
+ const char * bigram_filename = "deleted_bigram.db";
setlocale(LC_ALL, "");
while ( i < argc ){
@@ -61,7 +61,7 @@ int main(int argc, char * argv[]){
PhraseLargeTable phrases;
//init phrase lookup
MemoryChunk * new_chunk = new MemoryChunk;
- new_chunk->load("../../data/phrase_index.bin");
+ new_chunk->load("phrase_index.bin");
phrases.load(new_chunk);
Bigram bigram;
diff --git a/utils/training/gen_k_mixture_model.cpp b/utils/training/gen_k_mixture_model.cpp
index f6c9835..05dfa01 100644
--- a/utils/training/gen_k_mixture_model.cpp
+++ b/utils/training/gen_k_mixture_model.cpp
@@ -345,7 +345,7 @@ int main(int argc, char * argv[]){
PhraseLargeTable phrases;
MemoryChunk * chunk = new MemoryChunk;
- chunk->load("../../data/phrase_index.bin");
+ chunk->load("phrase_index.bin");
phrases.load(chunk);
KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER);
diff --git a/utils/training/gen_ngram.cpp b/utils/training/gen_ngram.cpp
index 2b0e1dd..bfd35cc 100644
--- a/utils/training/gen_ngram.cpp
+++ b/utils/training/gen_ngram.cpp
@@ -36,7 +36,7 @@ void print_help(){
int main(int argc, char * argv[]){
int i = 1;
bool train_pi_gram = true;
- const char * bigram_filename = "../../data/bigram.db";
+ const char * bigram_filename = "bigram.db";
setlocale(LC_ALL, "");
while ( i < argc ){
@@ -61,19 +61,19 @@ int main(int argc, char * argv[]){
g_phrases = new PhraseLargeTable;
//init phrase lookup
MemoryChunk * chunk = new MemoryChunk;
- chunk->load("../../data/phrase_index.bin");
+ chunk->load("phrase_index.bin");
g_phrases->load(chunk);
FacadePhraseIndex phrase_index;
//gb_char binary file
chunk = new MemoryChunk;
- chunk->load("../../data/gb_char.bin");
+ chunk->load("gb_char.bin");
phrase_index.load(1, chunk);
//gbk_char binary file
chunk = new MemoryChunk;
- chunk->load("../../data/gbk_char.bin");
+ chunk->load("gbk_char.bin");
phrase_index.load(2, chunk);
Bigram bigram;
@@ -142,12 +142,12 @@ int main(int argc, char * argv[]){
MemoryChunk * new_chunk = new MemoryChunk;
phrase_index.store(1, new_chunk);
- new_chunk->save("../../data/gb_char.bin");
+ new_chunk->save("gb_char.bin");
phrase_index.load(1, new_chunk);
new_chunk = new MemoryChunk;
phrase_index.store(2, new_chunk);
- new_chunk->save("../../data/gbk_char.bin");
+ new_chunk->save("gbk_char.bin");
phrase_index.load(2, new_chunk);
return 0;
diff --git a/utils/training/gen_unigram.cpp b/utils/training/gen_unigram.cpp
index 1fe7ae0..c2e91a7 100644
--- a/utils/training/gen_unigram.cpp
+++ b/utils/training/gen_unigram.cpp
@@ -30,12 +30,12 @@ int main(int argc, char * argv[]){
//gb_char binary file
MemoryChunk * chunk = new MemoryChunk;
- chunk->load("../../data/gb_char.bin");
+ chunk->load("gb_char.bin");
phrase_index.load(1, chunk);
//gbk_char binary file
chunk = new MemoryChunk;
- chunk->load("../../data/gbk_char.bin");
+ chunk->load("gbk_char.bin");
phrase_index.load(2, chunk);
PhraseIndexRange range;
@@ -57,12 +57,12 @@ int main(int argc, char * argv[]){
MemoryChunk * new_chunk = new MemoryChunk;
phrase_index.store(1, new_chunk);
- new_chunk->save("../../data/gb_char.bin");
+ new_chunk->save("gb_char.bin");
phrase_index.load(1, new_chunk);
new_chunk = new MemoryChunk;
phrase_index.store(2, new_chunk);
- new_chunk->save("../../data/gbk_char.bin");
+ new_chunk->save("gbk_char.bin");
phrase_index.load(2, new_chunk);
return 0;
diff --git a/utils/training/import_k_mixture_model.cpp b/utils/training/import_k_mixture_model.cpp
index ccffc78..6d0fafd 100644
--- a/utils/training/import_k_mixture_model.cpp
+++ b/utils/training/import_k_mixture_model.cpp
@@ -241,7 +241,7 @@ int main(int argc, char * argv[]){
PhraseLargeTable phrases;
MemoryChunk * chunk = new MemoryChunk;
- chunk->load("../../data/phrase_index.bin");
+ chunk->load("phrase_index.bin");
phrases.load(chunk);
KMixtureModelBigram bigram(K_MIXTURE_MODEL_MAGIC_NUMBER);