diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-02-21 14:13:55 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-02-21 14:13:55 +0000 |
commit | b5491898549c61bd799d199aa9178a8394a1ef69 (patch) | |
tree | fb2686a2aae03ff07bcdf4cd47e8c3191eff8d1e /klm/search | |
parent | 0187447a643c3ea262b13b3052cb1531990eafe6 (diff) | |
parent | c17d9c23d023a5c08656376944f636180f0a437b (diff) |
Merge branch 'master' of https://github.com/pauldb89/cdec
Diffstat (limited to 'klm/search')
-rw-r--r-- | klm/search/Jamfile | 5 | ||||
-rw-r--r-- | klm/search/Makefile.am | 14 | ||||
-rw-r--r-- | klm/search/vertex.hh | 6 | ||||
-rw-r--r-- | klm/search/vertex_generator.hh | 1 |
4 files changed, 17 insertions, 9 deletions
diff --git a/klm/search/Jamfile b/klm/search/Jamfile deleted file mode 100644 index bc95c53a..00000000 --- a/klm/search/Jamfile +++ /dev/null @@ -1,5 +0,0 @@ -lib search : weights.cc vertex.cc vertex_generator.cc edge_generator.cc rule.cc ../lm//kenlm ../util//kenutil /top//boost_system : : : <include>.. ; - -import testing ; - -unit-test weights_test : weights_test.cc search /top//boost_unit_test_framework ; diff --git a/klm/search/Makefile.am b/klm/search/Makefile.am index 5aea33c2..03554276 100644 --- a/klm/search/Makefile.am +++ b/klm/search/Makefile.am @@ -1,11 +1,23 @@ noinst_LIBRARIES = libksearch.a libksearch_a_SOURCES = \ + applied.hh \ + config.hh \ + context.hh \ + dedupe.hh \ + edge.hh \ + edge_generator.hh \ + header.hh \ + nbest.hh \ + rule.hh \ + types.hh \ + vertex.hh \ + vertex_generator.hh \ edge_generator.cc \ nbest.cc \ rule.cc \ vertex.cc \ vertex_generator.cc -AM_CPPFLAGS = -W -Wall -Wno-sign-compare $(GTEST_CPPFLAGS) -I.. +AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/klm diff --git a/klm/search/vertex.hh b/klm/search/vertex.hh index 10b3339b..ca9a4fcd 100644 --- a/klm/search/vertex.hh +++ b/klm/search/vertex.hh @@ -65,7 +65,7 @@ class VertexNode { } // Will be invalid unless this is a leaf. - const History End() const { return end_; } + History End() const { return end_; } const VertexNode &operator[](size_t index) const { return *extend_[index]; @@ -124,7 +124,7 @@ class PartialVertex { return ret; } - const History End() const { + History End() const { return back_->End(); } @@ -141,7 +141,7 @@ class Vertex { PartialVertex RootPartial() const { return PartialVertex(root_); } - const History BestChild() const { + History BestChild() const { PartialVertex top(RootPartial()); if (top.Empty()) { return History(); diff --git a/klm/search/vertex_generator.hh b/klm/search/vertex_generator.hh index da563c2d..646b8189 100644 --- a/klm/search/vertex_generator.hh +++ b/klm/search/vertex_generator.hh @@ -4,6 +4,7 @@ #include "search/edge.hh" #include "search/types.hh" #include "search/vertex.hh" +#include "util/exception.hh" #include <boost/unordered_map.hpp> #include <boost/version.hpp> |