-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added phrase-based test case. Phrase-based decoder (#172) functioning.
- Loading branch information
Showing
6 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
tm = phrase pt 0 rules.1.gz | ||
lm = kenlm 5 true false 100 lm.1.gz | ||
|
||
mark-oovs = false | ||
pop-limit = 10 | ||
top-n = 1 | ||
|
||
output-format = %i ||| %s ||| %f ||| %c | ||
|
||
include-align-index = true | ||
reordering-limit = 6 | ||
|
||
# And these are the feature functions to activate. | ||
feature-function = OOVPenalty | ||
feature-function = WordPenalty | ||
feature-function = Distortion | ||
feature-function = PhrasePenalty -owner pt | ||
|
||
OOVPenalty -100 | ||
Distortion 0.114849 | ||
WordPenalty -0.201544 | ||
PhrasePenalty -0.236965 | ||
tm_pt_0 0.0370068 | ||
tm_pt_1 0.0495759 | ||
tm_pt_2 0.196742 | ||
tm_pt_3 0.0745423 | ||
lm_0 0.204412452147565 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
una estrategia republicana para obstaculizar la reelección de Obama |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 ||| a strategy |0-1| republican |2-2| to hinder |3-4| reelection |5-6| Obama |7-8| ||| Distortion=0.000 WordPenalty=-3.040 PhrasePenalty=5.000 tm_pt_0=-9.702 tm_pt_1=-10.800 tm_pt_2=-7.543 tm_pt_3=-8.555 lm_0=-19.117 ||| -7.496 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -u | ||
|
||
cat corpus.es | $JOSHUA/bin/joshua-decoder -threads 1 -c config > output 2> log | ||
|
||
# Compare | ||
diff -u output output.gold > diff | ||
|
||
if [ $? -eq 0 ]; then | ||
rm -f diff output log | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
|
||
|