AlignmentInfo ctors should be private

This commit is contained in:
Ales Tamchyna 2015-01-09 14:24:16 +01:00
parent 4dd2ec652b
commit f260c4d231

View File

@ -41,6 +41,7 @@ class AlignmentInfo
friend struct AlignmentInfoOrderer; friend struct AlignmentInfoOrderer;
friend struct AlignmentInfoHasher; friend struct AlignmentInfoHasher;
friend class AlignmentInfoCollection; friend class AlignmentInfoCollection;
friend class VW;
public: public:
typedef std::set<std::pair<size_t,size_t> > CollType; typedef std::set<std::pair<size_t,size_t> > CollType;
@ -91,14 +92,14 @@ public:
m_nonTermIndexMap == rhs.m_nonTermIndexMap; m_nonTermIndexMap == rhs.m_nonTermIndexMap;
} }
// used only by VW to load word alignment between sentences
explicit AlignmentInfo(const std::string &str);
private: private:
//! AlignmentInfo objects should only be created by an AlignmentInfoCollection //! AlignmentInfo objects should only be created by an AlignmentInfoCollection
explicit AlignmentInfo(const std::set<std::pair<size_t,size_t> > &pairs); explicit AlignmentInfo(const std::set<std::pair<size_t,size_t> > &pairs);
explicit AlignmentInfo(const std::vector<unsigned char> &aln); explicit AlignmentInfo(const std::vector<unsigned char> &aln);
// used only by VW to load word alignment between sentences
explicit AlignmentInfo(const std::string &str);
void BuildNonTermIndexMaps(); void BuildNonTermIndexMaps();
CollType m_collection; CollType m_collection;