diff options
author | Chris Dyer <redpony@gmail.com> | 2014-10-09 00:43:57 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-10-09 00:43:57 -0400 |
commit | 4ebd159797a5db525fce7433e03858f8de96dce6 (patch) | |
tree | 2b56949600aa4c83f1490cd51b1e7e6517b3cb44 /decoder/lextrans.cc | |
parent | 53ab488ed99daecd726dfb2abce4cc278f09706f (diff) |
make tree terminals available to feature functions
Diffstat (limited to 'decoder/lextrans.cc')
-rw-r--r-- | decoder/lextrans.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/decoder/lextrans.cc b/decoder/lextrans.cc index 74a18c3f..d13a891a 100644 --- a/decoder/lextrans.cc +++ b/decoder/lextrans.cc @@ -271,10 +271,9 @@ bool LexicalTrans::TranslateImpl(const string& input, Hypergraph* forest) { Lattice& lattice = smeta->src_lattice_; LatticeTools::ConvertTextOrPLF(input, &lattice); - if (!lattice.IsSentence()) { - // lexical models make independence assumptions - // that don't work with lattices or conf nets - cerr << "LexicalTrans: cannot deal with lattice source input!\n"; + smeta->ComputeInputLatticeType(); + if (smeta->GetInputType() != cdec::kSEQUENCE) { + cerr << "LexicalTrans: cannot deal with non-sequence inputs\n"; abort(); } smeta->SetSourceLength(lattice.size()); |