summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder/kbest.h6
-rwxr-xr-xvest/dist-vest.pl3
2 files changed, 5 insertions, 4 deletions
diff --git a/decoder/kbest.h b/decoder/kbest.h
index b6f55502..4dcd1362 100644
--- a/decoder/kbest.h
+++ b/decoder/kbest.h
@@ -83,16 +83,16 @@ namespace KBest {
explicit EdgeHandle(Derivation const* d) : d(d) { }
// operator bool() const { return d->edge; }
operator Hypergraph::Edge const* () const { return d->edge; }
-// const Hypergraph::Edge* operator ->() const { return d->edge; }
+// Hypergraph::Edge const * operator ->() const { return d->edge; }
};
-// typedef Derivation EdgeHandle; // will cause copying, below but not performance critical; change to actual handle if you want
EdgeHandle operator()(int t,int taili,EdgeHandle const& parent) const {
return EdgeHandle(nds[t].D[parent.d->j[taili]]);
}
std::string derivation_tree(Derivation const& d,bool indent=true,int show_mask=Hypergraph::SPAN|Hypergraph::RULE,int maxdepth=0x7FFFFFFF,int depth=0) const {
- return d.edge->derivation_tree(*this,EdgeHandle(&d),indent,show_mask,maxdepth,depth);
+ EdgeHandle eh(d);
+ return d.edge->derivation_tree(*this,eh,indent,show_mask,maxdepth,depth);
}
struct DerivationUniquenessHash {
diff --git a/vest/dist-vest.pl b/vest/dist-vest.pl
index d512dbb1..fd4dbc0e 100755
--- a/vest/dist-vest.pl
+++ b/vest/dist-vest.pl
@@ -22,6 +22,7 @@ my $MAPINPUT = "$bin_dir/mr_vest_generate_mapper_input";
my $MAPPER = "$bin_dir/mr_vest_map";
my $REDUCER = "$bin_dir/mr_vest_reduce";
my $parallelize = "$bin_dir/parallelize.pl";
+my $sentserver = "$bin_dir/sentserver";
my $SCORER = $FAST_SCORE;
die "Can't find $MAPPER" unless -x $MAPPER;
my $cdec = "$bin_dir/../decoder/cdec";
@@ -192,7 +193,7 @@ if ($dryrun){
} else {
-e $dir || mkdir $dir;
mkdir "$dir/hgs";
- modbin("$dir/bin",\$cdec,\$SCORER,\$MAPINPUT,\$MAPPER,\$REDUCER,\$parallelize) if $cpbin;
+ modbin("$dir/bin",\$cdec,\$SCORER,\$MAPINPUT,\$MAPPER,\$REDUCER,\$parallelize,\$sentserver) if $cpbin;
mkdir "$dir/scripts";
my $cmdfile="$dir/rerun-vest.sh";
open CMD,'>',$cmdfile;