summaryrefslogtreecommitdiff
path: root/word-aligner/ttables.h
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-11-13 18:12:10 +0100
committerPatrick Simianer <p@simianer.de>2013-11-13 18:12:10 +0100
commit062d8af12f2bcad39c47b42295b69f44f878768f (patch)
treea455fb5dd1a3c01ca3fa6e2ddd5e368040e32eaa /word-aligner/ttables.h
parentb8bf706976720527b455eb665fe94f907e372b65 (diff)
parentf83186887c94b2ff8b17aefcd0b395f116c09eb6 (diff)
merge w/ upstream
Diffstat (limited to 'word-aligner/ttables.h')
-rw-r--r--word-aligner/ttables.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/word-aligner/ttables.h b/word-aligner/ttables.h
index 507f591a..d82aff72 100644
--- a/word-aligner/ttables.h
+++ b/word-aligner/ttables.h
@@ -2,7 +2,12 @@
#define _TTABLES_H_
#include <iostream>
-#include <tr1/unordered_map>
+#ifndef HAVE_OLD_CPP
+# include <unordered_map>
+#else
+# include <tr1/unordered_map>
+namespace std { using std::tr1::unordered_map; }
+#endif
#include "sparse_vector.h"
#include "m.h"
@@ -12,8 +17,8 @@
class TTable {
public:
TTable() {}
- typedef std::tr1::unordered_map<WordID, double> Word2Double;
- typedef std::tr1::unordered_map<WordID, Word2Double> Word2Word2Double;
+ typedef std::unordered_map<WordID, double> Word2Double;
+ typedef std::unordered_map<WordID, Word2Double> Word2Word2Double;
inline double prob(const int& e, const int& f) const {
const Word2Word2Double::const_iterator cit = ttable.find(e);
if (cit != ttable.end()) {