diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-23 17:33:47 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-23 17:33:47 +0000 |
commit | 072c4bb1edde483b87b93bc6f4eec36fc8a21008 (patch) | |
tree | 6ceaa6ae1e08df9e523282740b14f4857236297c /decoder/ff_wordalign.h | |
parent | 7e90b8ea10904f9b83f4e77e14c7396a3e6f7d5d (diff) | |
parent | 9e80389b9763aa4f7f626ec71b561ccf6948d3ad (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'decoder/ff_wordalign.h')
-rw-r--r-- | decoder/ff_wordalign.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/decoder/ff_wordalign.h b/decoder/ff_wordalign.h index ba3d0b9b..0161f603 100644 --- a/decoder/ff_wordalign.h +++ b/decoder/ff_wordalign.h @@ -5,8 +5,16 @@ #include "array2d.h" #include "factored_lexicon_helper.h" +#include <boost/functional/hash.hpp> +#include <cassert> #include <boost/scoped_ptr.hpp> #include <boost/multi_array.hpp> +#ifndef HAVE_OLD_CPP +# include <unordered_map> +#else +# include <tr1/unordered_map> +namespace std { using std::tr1::unordered_map; } +#endif class RelativeSentencePosition : public FeatureFunction { public: @@ -124,9 +132,6 @@ class LexicalTranslationTrigger : public FeatureFunction { std::vector<std::vector<WordID> > triggers_; }; -#include <tr1/unordered_map> -#include <boost/functional/hash.hpp> -#include <cassert> class BlunsomSynchronousParseHack : public FeatureFunction { public: BlunsomSynchronousParseHack(const std::string& param); @@ -196,7 +201,7 @@ class BlunsomSynchronousParseHack : public FeatureFunction { const int fid_; mutable int cur_sent_; - typedef std::tr1::unordered_map<std::vector<WordID>, int, boost::hash<std::vector<WordID> > > Vec2Int; + typedef std::unordered_map<std::vector<WordID>, int, boost::hash<std::vector<WordID> > > Vec2Int; mutable Vec2Int cur_map_; const std::vector<WordID> mutable * cur_ref_; mutable std::vector<std::vector<WordID> > refs_; |