https://github.com/wilkeraziz/mosesdecoder
Revision 8a2a99023aef8e7e0fe9763d728b998c5bc25711 authored by Ales Tamchyna on 03 January 2013, 12:39:15 UTC, committed by Ales Tamchyna on 03 January 2013, 12:39:15 UTC
1 parent e2cac60
Tip revision: 8a2a99023aef8e7e0fe9763d728b998c5bc25711 authored by Ales Tamchyna on 03 January 2013, 12:39:15 UTC
in LocalLM, do not try to predict words without context (at least 1 word)
in LocalLM, do not try to predict words without context (at least 1 word)
Tip revision: 8a2a990
PhrasePairCollection.h
#pragma once
#include <vector>
#include <string>
class Alignment;
class PhrasePair;
class SuffixArray;
class TargetCorpus;
class Mismatch;
class PhrasePairCollection
{
public:
typedef unsigned int INDEX;
private:
SuffixArray *m_suffixArray;
TargetCorpus *m_targetCorpus;
Alignment *m_alignment;
std::vector<std::vector<PhrasePair*> > m_collection;
std::vector< Mismatch* > m_mismatch, m_unaligned;
int m_size;
int m_max_lookup;
int m_max_pp_target;
int m_max_pp;
// No copying allowed.
PhrasePairCollection(const PhrasePairCollection&);
void operator=(const PhrasePairCollection&);
public:
PhrasePairCollection ( SuffixArray *, TargetCorpus *, Alignment * );
~PhrasePairCollection ();
bool GetCollection( const std::vector<std::string >& sourceString );
void Print() const;
void PrintHTML() const;
};
// sorting helper
struct CompareBySize {
bool operator()(const std::vector<PhrasePair*>& a, const std::vector<PhrasePair*>& b ) const {
return a.size() > b.size();
}
};
Computing file changes ...