00001 /* 00002 * hierarchical.h 00003 * 00004 * Created on: Jan 27, 2010 00005 * Author: Nadi Tomeh - LIMSI/CNRS 00006 * MT Marathon 2010, Dublin 00007 */ 00008 00009 #ifndef HIERARCHICAL_H_ 00010 #define HIERARCHICAL_H_ 00011 00012 #include <utility> 00013 #include <map> 00014 #include <set> 00015 #include <vector> 00016 00017 namespace MosesTraining 00018 { 00019 00020 // HPhraseVertex represents a point in the alignment matrix 00021 typedef std::pair <int, int> HPhraseVertex; 00022 00023 // Phrase represents a bi-phrase; each bi-phrase is defined by two points in the alignment matrix: 00024 // bottom-left and top-right 00025 typedef std::pair<HPhraseVertex, HPhraseVertex> HPhrase; 00026 00027 // HPhraseVector is a std::vector of phrases 00028 // the bool value indicates if the associated phrase is within the length limit or not 00029 typedef std::vector < HPhrase > HPhraseVector; 00030 00031 // SentenceVertices represents all vertices that have the same positioning of all extracted phrases 00032 // The key of the std::map is the English index and the value is a std::set of the foreign ones 00033 typedef std::map <int, std::set<int> > HSenteceVertices; 00034 00035 } // namespace 00036 00037 #endif /* HIERARCHICAL_H_ */