Skip to content

Commit

Permalink
remove dead code, add adagrad crf learner
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Dyer authored and Chris Dyer committed Nov 25, 2013
1 parent 9e80389 commit 26235c2
Show file tree
Hide file tree
Showing 34 changed files with 521 additions and 1,809 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ decoder/Makefile.in
decoder/bin/
decoder/cdec
decoder/dict_test
decoder/sv_test
decoder/ff_test
decoder/grammar_test
decoder/hg_test
Expand Down Expand Up @@ -162,6 +163,7 @@ training/liblbfgs/bin/
training/liblbfgs/ll_test
training/model1
training/mpi_batch_optimize
training/mpi_adagrad_optimize
training/mpi_compute_cllh
training/mpi_em_optimize
training/mpi_extract_features
Expand Down
7 changes: 0 additions & 7 deletions decoder/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ EXTRA_DIST = test_data rule_lexer.ll
libcdec_a_SOURCES = \
JSON_parser.h \
aligner.h \
apply_fsa_models.h \
apply_models.h \
bottom_up_parser.h \
cfg.h \
cfg_binarize.h \
cfg_format.h \
cfg_options.h \
csplit.h \
decoder.h \
earley_composer.h \
Expand Down Expand Up @@ -74,7 +69,6 @@ libcdec_a_SOURCES = \
freqdict.h \
grammar.h \
hg.h \
hg_cfg.h \
hg_intersect.h \
hg_io.h \
hg_remove_eps.h \
Expand Down Expand Up @@ -105,7 +99,6 @@ libcdec_a_SOURCES = \
bottom_up_parser.cc \
cdec.cc \
cdec_ff.cc \
cfg.cc \
csplit.cc \
decoder.cc \
earley_composer.cc \
Expand Down
65 changes: 0 additions & 65 deletions decoder/apply_fsa_models.h

This file was deleted.

10 changes: 5 additions & 5 deletions decoder/apply_models.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ class CubePruningRescorer {
assert(num_nodes >= 2);
int goal_id = num_nodes - 1;
int pregoal = goal_id - 1;
int every = 1;
if (num_nodes > 100) every = 10;
assert(in.nodes_[pregoal].out_edges_.size() == 1);
if (!SILENT) cerr << " ";
int has = 0;
Expand Down Expand Up @@ -563,12 +561,14 @@ struct NoPruningRescorer {
int num_nodes = in.nodes_.size();
int goal_id = num_nodes - 1;
int pregoal = goal_id - 1;
int every = 1;
if (num_nodes > 100) every = 10;
assert(in.nodes_[pregoal].out_edges_.size() == 1);
if (!SILENT) cerr << " ";
int has = 0;
for (int i = 0; i < in.nodes_.size(); ++i) {
if (!SILENT && i % every == 0) cerr << '.';
if (!SILENT) {
int needs = (50 * i / in.nodes_.size());
while (has < needs) { cerr << '.'; ++has; }
}
ProcessOneNode(i, i == goal_id);
}
if (!SILENT) cerr << endl;
Expand Down
Loading

0 comments on commit 26235c2

Please sign in to comment.