From 37162522a07551b261c445a92245445c5458f759 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 14 Mar 2013 23:46:46 -0400 Subject: fix source path --- decoder/cdec_ff.cc | 2 +- decoder/ff_source_path.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'decoder') diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc index a60f2c33..0bf441d4 100644 --- a/decoder/cdec_ff.cc +++ b/decoder/cdec_ff.cc @@ -71,7 +71,7 @@ void register_feature_functions() { ff_registry.Register("InputIndicator", new FFFactory); ff_registry.Register("LexicalTranslationTrigger", new FFFactory); ff_registry.Register("WordPairFeatures", new FFFactory); - ff_registry.Register("SourthPathFeatures", new FFFactory); + ff_registry.Register("SourcePathFeatures", new FFFactory); ff_registry.Register("WordSet", new FFFactory); ff_registry.Register("Dwarf", new FFFactory); ff_registry.Register("External", new FFFactory); diff --git a/decoder/ff_source_path.cc b/decoder/ff_source_path.cc index d5fa6bb3..56cbfc48 100644 --- a/decoder/ff_source_path.cc +++ b/decoder/ff_source_path.cc @@ -30,7 +30,7 @@ void SourcePathFeatures::TraversalFeaturesImpl(const SentenceMetadata& smeta, for (unsigned i = 0; i < f.size(); ++i) { int cur = f[i]; if (cur <= 0) - cur = *reinterpret_cast(ant_contexts[cur]); + cur = *reinterpret_cast(ant_contexts[-cur]); else FireUnigramFeature(cur, features); if (prev) FireBigramFeature(prev, cur, features); -- cgit v1.2.3