Formatting.

This commit is contained in:
Ulrich Germann 2015-11-10 01:19:50 +00:00
parent d94bc5df4c
commit 8e9b93c0ce
2 changed files with 18 additions and 11 deletions

View File

@ -20,8 +20,15 @@
namespace sapt namespace sapt
{ {
enum sampling_method { full_coverage, random_sampling, ranked_sampling, ranked_sampling2 }; enum
sampling_method
{
full_coverage,
random_sampling,
ranked_sampling,
ranked_sampling2
};
typedef ttrack::Position TokenPosition; typedef ttrack::Position TokenPosition;
class CandidateSorter class CandidateSorter
{ {

View File

@ -89,9 +89,9 @@ namespace sapt
p2 = 0; p2 = 0;
if (ps) if (ps)
{ {
raw1 = ps->raw_cnt; raw1 = ps->raw_cnt;
sample1 = ps->sample_cnt; sample1 = ps->sample_cnt;
good1 = ps->good; good1 = ps->good;
} }
else raw1 = sample1 = good1 = 0; else raw1 = sample1 = good1 = 0;
joint = 0; joint = 0;
@ -127,11 +127,11 @@ namespace sapt
// should we do that here or leave the raw counts? // should we do that here or leave the raw counts?
for (int i = 0; i <= LRModel::NONE; i++) for (int i = 0; i <= LRModel::NONE; i++)
{ {
PhraseOrientation po = static_cast<PhraseOrientation>(i); PhraseOrientation po = static_cast<PhraseOrientation>(i);
dfwd[i] = js.dcnt_fwd(po); dfwd[i] = js.dcnt_fwd(po);
dbwd[i] = js.dcnt_bwd(po); dbwd[i] = js.dcnt_bwd(po);
} }
indoc = js.indoc; indoc = js.indoc;
return *this; return *this;
} }
@ -282,8 +282,8 @@ namespace sapt
size_t offset; size_t offset;
if (dir == LRModel::Bidirectional) if (dir == LRModel::Bidirectional)
{ {
offset = num_scores; offset = num_scores;
num_scores *= 2; num_scores *= 2;
} }
else offset = 0; else offset = 0;