summaryrefslogtreecommitdiff
path: root/extractor
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-01-27 10:39:36 +0100
committerPatrick Simianer <p@simianer.de>2014-01-27 10:39:36 +0100
commit64e135092c140310345bb7fcf3dffc8072e652d3 (patch)
tree127636a2820fb9a7a522157ea4de55cdc0c3c0bd /extractor
parent58be95f557d2f6a006cc98a23de98125e6b83a32 (diff)
parent5ab6eb44d67a48ea5b366d8b2878f3da7ef960e4 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'extractor')
-rw-r--r--extractor/Makefile.am49
-rw-r--r--extractor/extract.cc6
-rw-r--r--extractor/run_extractor.cc4
-rw-r--r--extractor/sacompile.cc (renamed from extractor/compile.cc)0
4 files changed, 49 insertions, 10 deletions
diff --git a/extractor/Makefile.am b/extractor/Makefile.am
index e5b439f9..a406d9dc 100644
--- a/extractor/Makefile.am
+++ b/extractor/Makefile.am
@@ -1,7 +1,5 @@
-bin_PROGRAMS = compile run_extractor extract
-
-if HAVE_CXX11
+bin_PROGRAMS = sacompile run_extractor extract
EXTRA_PROGRAMS = alignment_test \
data_array_test \
@@ -114,8 +112,8 @@ vocabulary_test_LDADD = $(GTEST_LDFLAGS) $(GTEST_LIBS) libextractor.a
noinst_LIBRARIES = libextractor.a
-compile_SOURCES = compile.cc
-compile_LDADD = libextractor.a
+sacompile_SOURCES = sacompile.cc
+sacompile_LDADD = libextractor.a
run_extractor_SOURCES = run_extractor.cc
run_extractor_LDADD = libextractor.a
extract_SOURCES = extract.cc
@@ -134,6 +132,14 @@ libextractor_a_SOURCES = \
features/max_lex_target_given_source.cc \
features/sample_source_count.cc \
features/target_given_source_coherent.cc \
+ features/count_source_target.h \
+ features/feature.h \
+ features/is_source_singleton.h \
+ features/is_source_target_singleton.h \
+ features/max_lex_source_given_target.h \
+ features/max_lex_target_given_source.h \
+ features/sample_source_count.h \
+ features/target_given_source_coherent.h \
grammar.cc \
grammar_extractor.cc \
matchings_finder.cc \
@@ -154,8 +160,33 @@ libextractor_a_SOURCES = \
target_phrase_extractor.cc \
time_util.cc \
translation_table.cc \
- vocabulary.cc
+ vocabulary.cc \
+ alignment.h \
+ backoff_sampler.h \
+ data_array.h \
+ fast_intersector.h \
+ grammar.h \
+ grammar_extractor.h \
+ matchings_finder.h \
+ matchings_sampler.h \
+ matchings_trie.h \
+ phrase.h \
+ phrase_builder.h \
+ phrase_location.h \
+ phrase_location_sampler.h \
+ precomputation.h \
+ rule.h \
+ rule_extractor.h \
+ rule_extractor_helper.h \
+ rule_factory.h \
+ sampler.h \
+ scorer.h \
+ suffix_array.h \
+ suffix_array_sampler.h \
+ target_phrase_extractor.h \
+ time_util.h \
+ translation_table.h \
+ vocabulary.h
-AM_CPPFLAGS = -W -Wall -Wno-sign-compare $(CXX11_SWITCH) -fopenmp $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
-AM_LDFLAGS = -fopenmp
-endif
+AM_CPPFLAGS = -W -Wall -Wno-sign-compare $(OPENMP_CXXFLAGS) $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
+AM_LDFLAGS = $(OPENMP_CXXFLAGS)
diff --git a/extractor/extract.cc b/extractor/extract.cc
index 387cbe9b..e5b6f6ff 100644
--- a/extractor/extract.cc
+++ b/extractor/extract.cc
@@ -8,7 +8,11 @@
#include <boost/filesystem.hpp>
#include <boost/program_options.hpp>
#include <boost/program_options/variables_map.hpp>
-#include <omp.h>
+#if HAVE_OPEN_MP
+ #include <omp.h>
+#else
+ const unsigned omp_get_num_threads() { return 1; }
+#endif
#include "alignment.h"
#include "data_array.h"
diff --git a/extractor/run_extractor.cc b/extractor/run_extractor.cc
index f1aa5e35..00564a36 100644
--- a/extractor/run_extractor.cc
+++ b/extractor/run_extractor.cc
@@ -8,7 +8,11 @@
#include <boost/filesystem.hpp>
#include <boost/program_options.hpp>
#include <boost/program_options/variables_map.hpp>
+#if HAVE_OPEN_MP
#include <omp.h>
+#else
+ const unsigned omp_get_num_threads() { return 1; }
+#endif
#include "alignment.h"
#include "data_array.h"
diff --git a/extractor/compile.cc b/extractor/sacompile.cc
index 3ee668ce..3ee668ce 100644
--- a/extractor/compile.cc
+++ b/extractor/sacompile.cc