diff options
author | Matthias Huck <huck@i6.informatik.rwth-aachen.de> | 2014-06-11 23:26:24 +0400 |
---|---|---|
committer | Matthias Huck <huck@i6.informatik.rwth-aachen.de> | 2014-06-11 23:26:24 +0400 |
commit | 7380a83f752e2a3c0165f6175b7ac097ac7bd041 (patch) | |
tree | 5df3e5d0f06b4c19e661e44135b21c8eb979a986 /moses/PP | |
parent | e693a27e4e81ba9609b8c69bdc30c0895c685bfc (diff) |
CountsPhraseProperty: add comment to header
Diffstat (limited to 'moses/PP')
-rw-r--r-- | moses/PP/CountsPhraseProperty.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/moses/PP/CountsPhraseProperty.h b/moses/PP/CountsPhraseProperty.h index 24e4eaa40..f633381b6 100644 --- a/moses/PP/CountsPhraseProperty.h +++ b/moses/PP/CountsPhraseProperty.h @@ -8,6 +8,22 @@ namespace Moses { +// A simple phrase property class to access the three phrase count values. +// +// The counts are usually not needed during decoding and are not loaded +// from the phrase table. This is just a workaround that can make them +// available to features which have a use for them. +// +// If you need access to the counts, copy the two marginal counts and the +// joint count into an additional information property with key "Counts", +// e.g. using awk: +// +// $ zcat phrase-table.gz | awk -F' \|\|\| ' '{printf("%s {{Counts %s}}\n",$0,$5);}' | gzip -c > phrase-table.withCountsPP.gz +// +// CountsPhraseProperty reads them from the phrase table and provides +// methods GetSourceMarginal(), GetTargetMarginal(), GetJointCount(). + + class CountsPhraseProperty : public PhraseProperty { public: |