mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-24 20:32:59 +03:00
New dummy bias that always returns 1.
Purpose: to keep track of phrase counts per document. If no bias is given, no per-documents counts are stored.
This commit is contained in:
parent
f26e2008ca
commit
70a1c88614
@ -91,5 +91,17 @@ namespace Moses
|
||||
|
||||
};
|
||||
|
||||
class
|
||||
SamplingBiasAlways : public SamplingBias
|
||||
{
|
||||
public:
|
||||
SamplingBiasAlways(std::vector<id_type> const* sid2docid)
|
||||
: SamplingBias(sid2docid) {}
|
||||
|
||||
float operator[](id_type const idx) { return 1; }
|
||||
float operator[](id_type const idx) const { return 1; }
|
||||
size_t size() const { return 0; }
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user