From 1d87fbb31502ba27f0469e4a576e410ee43ad77a Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 9 Oct 2014 00:43:57 -0400 Subject: make tree terminals available to feature functions --- decoder/lexalign.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'decoder/lexalign.cc') diff --git a/decoder/lexalign.cc b/decoder/lexalign.cc index 11f20de7..dd529311 100644 --- a/decoder/lexalign.cc +++ b/decoder/lexalign.cc @@ -114,10 +114,9 @@ bool LexicalAlign::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 input!"; abort(); } smeta->SetSourceLength(lattice.size()); -- cgit v1.2.3