mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 03:33:37 +03:00
6acd6a8684
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4026 1f5c12ca-751b-0410-a591-d2e778427230
41 lines
864 B
C++
41 lines
864 B
C++
#include "Vocabulary.h"
|
|
#include "SuffixArray.h"
|
|
#include "TargetCorpus.h"
|
|
#include "Alignment.h"
|
|
#include "PhrasePair.h"
|
|
#include "Mismatch.h"
|
|
|
|
#pragma once
|
|
|
|
class PhrasePairCollection
|
|
{
|
|
public:
|
|
typedef unsigned int INDEX;
|
|
|
|
private:
|
|
SuffixArray *m_suffixArray;
|
|
TargetCorpus *m_targetCorpus;
|
|
Alignment *m_alignment;
|
|
vector< vector<PhrasePair*> > m_collection;
|
|
vector< Mismatch* > m_mismatch, m_unaligned;
|
|
int m_size;
|
|
int m_max_lookup;
|
|
int m_max_pp_target;
|
|
int m_max_pp;
|
|
|
|
public:
|
|
PhrasePairCollection ( SuffixArray *, TargetCorpus *, Alignment * );
|
|
~PhrasePairCollection ();
|
|
|
|
bool GetCollection( const vector< string > sourceString );
|
|
void Print();
|
|
void PrintHTML();
|
|
};
|
|
|
|
// sorting helper
|
|
struct CompareBySize {
|
|
bool operator()(const vector<PhrasePair*> a, const vector<PhrasePair*> b ) const {
|
|
return a.size() > b.size();
|
|
}
|
|
};
|