Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses/PP
diff options
context:
space:
mode:
authorMatthias Huck <huck@i6.informatik.rwth-aachen.de>2014-06-11 23:26:24 +0400
committerMatthias Huck <huck@i6.informatik.rwth-aachen.de>2014-06-11 23:26:24 +0400
commit7380a83f752e2a3c0165f6175b7ac097ac7bd041 (patch)
tree5df3e5d0f06b4c19e661e44135b21c8eb979a986 /moses/PP
parente693a27e4e81ba9609b8c69bdc30c0895c685bfc (diff)
CountsPhraseProperty: add comment to header
Diffstat (limited to 'moses/PP')
-rw-r--r--moses/PP/CountsPhraseProperty.h16
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: