summaryrefslogtreecommitdiff
path: root/decoder/sentence_metadata.h
diff options
context:
space:
mode:
authorvladimir.eidelman <vladimir.eidelman@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-14 23:00:08 +0000
committervladimir.eidelman <vladimir.eidelman@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-14 23:00:08 +0000
commit2775fc13d1e8d3ad45c8ddf94226397403e0e373 (patch)
tree487fe0f9e717e6d444a448142d7b91e75e6873a1 /decoder/sentence_metadata.h
parent8f97e6b03114761870f0c72f18f0928fac28d0f9 (diff)
Added oracle forest rescoring
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@254 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/sentence_metadata.h')
-rw-r--r--decoder/sentence_metadata.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/decoder/sentence_metadata.h b/decoder/sentence_metadata.h
index ef9eb388..21be9b21 100644
--- a/decoder/sentence_metadata.h
+++ b/decoder/sentence_metadata.h
@@ -3,6 +3,7 @@
#include <cassert>
#include "lattice.h"
+#include "../vest/scorer.h"
struct SentenceMetadata {
SentenceMetadata(int id, const Lattice& ref) :
@@ -30,10 +31,22 @@ struct SentenceMetadata {
// this will be empty if the translator accepts non FS input!
const Lattice& GetSourceLattice() const { return src_lattice_; }
+ // access to document level scores for MIRA vector computation
+ void SetScore(Score *s){app_score=s;}
+ void SetDocScorer (const DocScorer *d){ds = d;}
+ void SetDocLen(double dl){doc_len = dl;}
+
+ const Score& GetScore() const { return *app_score; }
+ const DocScorer& GetDocScorer() const { return *ds; }
+ double GetDocLen() const {return doc_len;}
+
private:
const int sent_id_;
// the following should be set, if possible, by the Translator
int src_len_;
+ double doc_len;
+ const DocScorer* ds;
+ const Score* app_score;
public:
Lattice src_lattice_; // this will only be set if inputs are finite state!
private: