summaryrefslogtreecommitdiff
path: root/dtrain/test
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2012-03-13 09:15:46 +0100
committerPatrick Simianer <p@simianer.de>2012-03-13 09:15:46 +0100
commit10a232656a0c882b3b955d2bcfac138ce11e8a2e (patch)
tree134e2637908cd85b3548d68ac8590f3aad8d1c49 /dtrain/test
parente77078e31cd75f0e5983d332b990809a3644b0fb (diff)
polish
Diffstat (limited to 'dtrain/test')
-rw-r--r--dtrain/test/example/cdec.ini8
-rw-r--r--dtrain/test/example/dtrain.ini28
-rw-r--r--dtrain/test/mtm11/logreg_cd/bin_class.cc (renamed from dtrain/test/logreg_cd/bin_class.cc)0
-rw-r--r--dtrain/test/mtm11/logreg_cd/bin_class.h (renamed from dtrain/test/logreg_cd/bin_class.h)0
-rw-r--r--dtrain/test/mtm11/logreg_cd/log_reg.cc (renamed from dtrain/test/logreg_cd/log_reg.cc)0
-rw-r--r--dtrain/test/mtm11/logreg_cd/log_reg.h (renamed from dtrain/test/logreg_cd/log_reg.h)0
-rw-r--r--dtrain/test/mtm11/mira_update/Hildreth.cpp (renamed from dtrain/test/mira_update/Hildreth.cpp)0
-rw-r--r--dtrain/test/mtm11/mira_update/Hildreth.h (renamed from dtrain/test/mira_update/Hildreth.h)0
-rw-r--r--dtrain/test/mtm11/mira_update/dtrain.cc (renamed from dtrain/test/mira_update/dtrain.cc)0
-rw-r--r--dtrain/test/mtm11/mira_update/sample.h (renamed from dtrain/test/mira_update/sample.h)0
-rw-r--r--dtrain/test/test.in3
-rw-r--r--dtrain/test/toy/dtrain.ini11
-rw-r--r--dtrain/test/toy/in2
-rw-r--r--dtrain/test/toy/input2
14 files changed, 27 insertions, 27 deletions
diff --git a/dtrain/test/example/cdec.ini b/dtrain/test/example/cdec.ini
index ad958ca6..fe5ca759 100644
--- a/dtrain/test/example/cdec.ini
+++ b/dtrain/test/example/cdec.ini
@@ -5,6 +5,7 @@ intersection_strategy=cube_pruning
cubepruning_pop_limit=30
feature_function=WordPenalty
feature_function=KLanguageModel test/example/nc-wmt11.en.srilm.gz
+# all currently working feature function for translation:
#feature_function=ArityPenalty
#feature_function=CMR2008ReorderingFeatures
#feature_function=Dwarf
@@ -14,9 +15,10 @@ feature_function=KLanguageModel test/example/nc-wmt11.en.srilm.gz
#feature_function=NgramFeatures
#feature_function=NonLatinCount
#feature_function=OutputIndicator
-#feature_function=RuleIdentityFeatures
-#feature_function=RuleNgramFeatures
-#feature_function=RuleShape
+feature_function=RuleIdentityFeatures
+feature_function=RuleNgramFeatures
+feature_function=RuleShape
#feature_function=SourceSpanSizeFeatures
#feature_function=SourceWordPenalty
#feature_function=SpanFeatures
+# ^^^ features active that were used in the ACL paper
diff --git a/dtrain/test/example/dtrain.ini b/dtrain/test/example/dtrain.ini
index ed1b7e5f..68173e11 100644
--- a/dtrain/test/example/dtrain.ini
+++ b/dtrain/test/example/dtrain.ini
@@ -1,20 +1,20 @@
input=test/example/nc-wmt11.1k.gz # use '-' for stdin
-output=w.gz # a weights file
-decoder_config=test/example/cdec.ini # a ini for cdec
+output=- # a weights file or stdout
+decoder_config=test/example/cdec.ini # ini for cdec
# these will be printed on each iteration
print_weights=Glue WordPenalty LanguageModel LanguageModel_OOV PhraseModel_0 PhraseModel_1 PhraseModel_2 PhraseModel_3 PhraseModel_4 PhraseModel_5 PhraseModel_6 PassThrough
tmp=/tmp
-stop_after=20
+stop_after=10 # stop iteration after 10 inputs
# interesting stuff
-epochs=1
-k=100
-N=4
-learning_rate=0.0001
-gamma=0.00001
-scorer=stupid_bleu
-sample_from=kbest
-filter=uniq
-pair_sampling=108010
-pair_threshold=0.01
-select_weights=last
+epochs=3 # run over input 3 times
+k=200 # use 100best lists
+N=4 # optimize (approx) BLEU4
+learning_rate=0.0001 # learning rate
+gamma=0.00001 # use SVM reg
+scorer=stupid_bleu # use stupid BLEU+1 approx.
+sample_from=kbest # use kbest lists (as opposed to forest)
+filter=uniq # only uniq entries in kbest
+pair_sampling=108010 # 10 vs 80 vs 10 and 80 vs 10
+pair_threshold=0 # minimum distance in BLEU
+select_weights=last # just output last weights
diff --git a/dtrain/test/logreg_cd/bin_class.cc b/dtrain/test/mtm11/logreg_cd/bin_class.cc
index 19bcde25..19bcde25 100644
--- a/dtrain/test/logreg_cd/bin_class.cc
+++ b/dtrain/test/mtm11/logreg_cd/bin_class.cc
diff --git a/dtrain/test/logreg_cd/bin_class.h b/dtrain/test/mtm11/logreg_cd/bin_class.h
index 3466109a..3466109a 100644
--- a/dtrain/test/logreg_cd/bin_class.h
+++ b/dtrain/test/mtm11/logreg_cd/bin_class.h
diff --git a/dtrain/test/logreg_cd/log_reg.cc b/dtrain/test/mtm11/logreg_cd/log_reg.cc
index ec2331fe..ec2331fe 100644
--- a/dtrain/test/logreg_cd/log_reg.cc
+++ b/dtrain/test/mtm11/logreg_cd/log_reg.cc
diff --git a/dtrain/test/logreg_cd/log_reg.h b/dtrain/test/mtm11/logreg_cd/log_reg.h
index ecc560b8..ecc560b8 100644
--- a/dtrain/test/logreg_cd/log_reg.h
+++ b/dtrain/test/mtm11/logreg_cd/log_reg.h
diff --git a/dtrain/test/mira_update/Hildreth.cpp b/dtrain/test/mtm11/mira_update/Hildreth.cpp
index 0e67eb15..0e67eb15 100644
--- a/dtrain/test/mira_update/Hildreth.cpp
+++ b/dtrain/test/mtm11/mira_update/Hildreth.cpp
diff --git a/dtrain/test/mira_update/Hildreth.h b/dtrain/test/mtm11/mira_update/Hildreth.h
index 8d791085..8d791085 100644
--- a/dtrain/test/mira_update/Hildreth.h
+++ b/dtrain/test/mtm11/mira_update/Hildreth.h
diff --git a/dtrain/test/mira_update/dtrain.cc b/dtrain/test/mtm11/mira_update/dtrain.cc
index 933417a4..933417a4 100644
--- a/dtrain/test/mira_update/dtrain.cc
+++ b/dtrain/test/mtm11/mira_update/dtrain.cc
diff --git a/dtrain/test/mira_update/sample.h b/dtrain/test/mtm11/mira_update/sample.h
index 5c331bba..5c331bba 100644
--- a/dtrain/test/mira_update/sample.h
+++ b/dtrain/test/mtm11/mira_update/sample.h
diff --git a/dtrain/test/test.in b/dtrain/test/test.in
deleted file mode 100644
index 4f53335e..00000000
--- a/dtrain/test/test.in
+++ /dev/null
@@ -1,3 +0,0 @@
-0 vorrichtung means [X] ||| vorrichtung ||| apparatus ||| LogP=0 ||| 0-0 __NEXT_RULE__ [X] ||| vorrichtung ||| means ||| LogP=-100 ||| 0-0
-1 Test test [X] ||| Test ||| test ||| LogP=0 ||| 0-0 __NEXT_RULE__ [X] ||| Test ||| xxx ||| LogP=-100 ||| 0-0
-2 kaputt broken
diff --git a/dtrain/test/toy/dtrain.ini b/dtrain/test/toy/dtrain.ini
index 3548bbb6..abf22b94 100644
--- a/dtrain/test/toy/dtrain.ini
+++ b/dtrain/test/toy/dtrain.ini
@@ -1,11 +1,12 @@
decoder_config=test/toy/cdec.ini
-input=test/toy/in
+input=test/toy/input
output=-
-print_weights=logp use_shell use_house PassThrough
-
+print_weights=logp shell_rule house_rule small_rule little_rule PassThrough
k=4
-N=3
-epochs=2
+N=4
+epochs=3
scorer=stupid_bleu
sample_from=kbest
filter=uniq
+pair_sampling=all
+learning_rate=1
diff --git a/dtrain/test/toy/in b/dtrain/test/toy/in
deleted file mode 100644
index d7b7d080..00000000
--- a/dtrain/test/toy/in
+++ /dev/null
@@ -1,2 +0,0 @@
-0 ich sah ein kleines haus i saw a little house [S] ||| [NP,1] [VP,2] ||| [1] [2] ||| logp=0 [NP] ||| ich ||| i ||| logp=0 [NP] ||| ein [NN,1] ||| a [1] ||| logp=0 [NN] ||| [JJ,1] haus ||| [1] house ||| logp=0 use_house=1 [NN] ||| [JJ,1] haus ||| [1] shell ||| logp=0 use_shell=1 [JJ] ||| kleines ||| small ||| logp=0 [JJ] ||| kleines ||| little ||| logp=0 [JJ] ||| grosses ||| big ||| logp=0 [JJ] ||| grosses ||| large ||| logp=0 [VP] ||| [V,1] [NP,2] ||| [1] [2] ||| logp=0 [V] ||| sah ||| saw ||| logp=0 [V] ||| fand ||| found ||| logp=0
-1 ich fand ein grosses haus i found a large house [S] ||| [NP,1] [VP,2] ||| [1] [2] ||| logp=0 [NP] ||| ich ||| i ||| logp=0 [NP] ||| ein [NN,1] ||| a [1] ||| logp=0 [NN] ||| [JJ,1] haus ||| [1] house ||| logp=0 use_house=1 [NN] ||| [JJ,1] haus ||| [1] shell ||| logp=0 use_shell=1 [JJ] ||| kleines ||| small ||| logp=0 [JJ] ||| kleines ||| little ||| logp=0 [JJ] ||| grosses ||| big ||| logp=0 [JJ] ||| grosses ||| large ||| logp=0 [VP] ||| [V,1] [NP,2] ||| [1] [2] ||| logp=0 [V] ||| sah ||| saw ||| logp=0 [V] ||| fand ||| found ||| logp=0
diff --git a/dtrain/test/toy/input b/dtrain/test/toy/input
new file mode 100644
index 00000000..4d10a9ea
--- /dev/null
+++ b/dtrain/test/toy/input
@@ -0,0 +1,2 @@
+0 ich sah ein kleines haus i saw a little house [S] ||| [NP,1] [VP,2] ||| [1] [2] ||| logp=0 [NP] ||| ich ||| i ||| logp=0 [NP] ||| ein [NN,1] ||| a [1] ||| logp=0 [NN] ||| [JJ,1] haus ||| [1] house ||| logp=0 house_rule=1 [NN] ||| [JJ,1] haus ||| [1] shell ||| logp=0 shell_rule=1 [JJ] ||| kleines ||| small ||| logp=0 small_rule=1 [JJ] ||| kleines ||| little ||| logp=0 little_rule=1 [JJ] ||| grosses ||| big ||| logp=0 [JJ] ||| grosses ||| large ||| logp=0 [VP] ||| [V,1] [NP,2] ||| [1] [2] ||| logp=0 [V] ||| sah ||| saw ||| logp=0 [V] ||| fand ||| found ||| logp=0
+1 ich fand ein kleines haus i found a little house [S] ||| [NP,1] [VP,2] ||| [1] [2] ||| logp=0 [NP] ||| ich ||| i ||| logp=0 [NP] ||| ein [NN,1] ||| a [1] ||| logp=0 [NN] ||| [JJ,1] haus ||| [1] house ||| logp=0 house_rule=1 [NN] ||| [JJ,1] haus ||| [1] shell ||| logp=0 shell_rule=1 [JJ] ||| kleines ||| small ||| logp=0 small_rule=1 [JJ] ||| kleines ||| little ||| logp=0 little_rule=1 [JJ] ||| grosses ||| big ||| logp=0 [JJ] ||| grosses ||| large ||| logp=0 [VP] ||| [V,1] [NP,2] ||| [1] [2] ||| logp=0 [V] ||| sah ||| saw ||| logp=0 [V] ||| fand ||| found ||| logp=0