summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder/cdec_ff.cc2
-rw-r--r--decoder/ff_source_path.cc2
2 files changed, 2 insertions, 2 deletions
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<InputIndicator>);
ff_registry.Register("LexicalTranslationTrigger", new FFFactory<LexicalTranslationTrigger>);
ff_registry.Register("WordPairFeatures", new FFFactory<WordPairFeatures>);
- ff_registry.Register("SourthPathFeatures", new FFFactory<SourcePathFeatures>);
+ ff_registry.Register("SourcePathFeatures", new FFFactory<SourcePathFeatures>);
ff_registry.Register("WordSet", new FFFactory<WordSet>);
ff_registry.Register("Dwarf", new FFFactory<Dwarf>);
ff_registry.Register("External", new FFFactory<ExternalFeature>);
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<const WordID*>(ant_contexts[cur]);
+ cur = *reinterpret_cast<const WordID*>(ant_contexts[-cur]);
else
FireUnigramFeature(cur, features);
if (prev) FireBigramFeature(prev, cur, features);