mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
42 lines
752 B
C++
42 lines
752 B
C++
/*
|
|
* ConsistentPhrases.h
|
|
*
|
|
* Created on: 20 Feb 2014
|
|
* Author: hieu
|
|
*/
|
|
#pragma once
|
|
|
|
#include <set>
|
|
#include <vector>
|
|
#include <iostream>
|
|
#include "ConsistentPhrase.h"
|
|
|
|
class Word;
|
|
class Parameter;
|
|
|
|
class ConsistentPhrases
|
|
{
|
|
public:
|
|
typedef std::set<ConsistentPhrase*> Coll;
|
|
|
|
ConsistentPhrases();
|
|
virtual ~ConsistentPhrases();
|
|
|
|
void Initialize(size_t size);
|
|
|
|
void Add(int sourceStart, int sourceEnd,
|
|
int targetStart, int targetEnd,
|
|
const Parameter ¶ms);
|
|
|
|
void AddHieroNonTerms(const Parameter ¶ms);
|
|
|
|
const Coll &GetColl(int sourceStart, int sourceEnd) const;
|
|
Coll &GetColl(int sourceStart, int sourceEnd);
|
|
|
|
std::string Debug() const;
|
|
|
|
protected:
|
|
std::vector< std::vector<Coll> > m_coll;
|
|
};
|
|
|