From 411ad2eb4a09ef04a7529bc1a178e83f624c6569 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Mon, 13 Jan 2014 17:15:24 +0100
Subject: Felix' https://github.com/felleh lexical word alignment features
---
decoder/Makefile.am | 1 +
decoder/cdec_ff.cc | 2 +
decoder/ff_lexical.h | 128 ++++++++++++++++++++++
training/dtrain/examples/standard/cdec.ini | 3 +-
training/dtrain/examples/standard/expected-output | 115 +++++++++----------
5 files changed, 191 insertions(+), 58 deletions(-)
create mode 100644 decoder/ff_lexical.h
diff --git a/decoder/Makefile.am b/decoder/Makefile.am
index b735756d..c0371081 100644
--- a/decoder/Makefile.am
+++ b/decoder/Makefile.am
@@ -48,6 +48,7 @@ libcdec_a_SOURCES = \
ff_external.h \
ff_factory.h \
ff_klm.h \
+ ff_lexical.h \
ff_lm.h \
ff_ngrams.h \
ff_parse_match.h \
diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc
index b2541722..80b42d22 100644
--- a/decoder/cdec_ff.cc
+++ b/decoder/cdec_ff.cc
@@ -24,6 +24,7 @@
#include "ff_charset.h"
#include "ff_wordset.h"
#include "ff_external.h"
+#include "ff_lexical.h"
void register_feature_functions() {
@@ -39,6 +40,7 @@ void register_feature_functions() {
RegisterFF();
RegisterFF();
RegisterFF();
+ RegisterFF();
//TODO: use for all features the new Register which requires static FF::usage(false,false) give name
ff_registry.Register("SpanFeatures", new FFFactory());
diff --git a/decoder/ff_lexical.h b/decoder/ff_lexical.h
new file mode 100644
index 00000000..21c85b27
--- /dev/null
+++ b/decoder/ff_lexical.h
@@ -0,0 +1,128 @@
+#ifndef FF_LEXICAL_H_
+#define FF_LEXICAL_H_
+
+#include
+#include