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
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-10-28 13:26:41 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-10-28 13:26:41 +0300
commit6a2e6feeed434966ba72adc9f26d7b3496070b87 (patch)
treee5d391f97ac84817851f906e85a3eed5a6cd7c97 /moses/Phrase.h
parent50c109699618ef4372ba78c4e3bf7e788c6a0884 (diff)
Context weights now live in the ContextScope, not any more on TranslationTask.
TargetPhrase now has weak ptr to ContextScope, not to TranslationTask any more, because TargetPhrases can outlive the scope of a Translation Task.
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r--moses/Phrase.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/moses/Phrase.h b/moses/Phrase.h
index 72454595f..8fd3911d3 100644
--- a/moses/Phrase.h
+++ b/moses/Phrase.h
@@ -1,4 +1,4 @@
-// $Id$
+// -*- mode: c++; indent-tabs-mode: nil; tab-width:2 -*-
// vim:tabstop=2
/***********************************************************************
@@ -40,6 +40,7 @@ namespace Moses
{
class FactorMask;
class Range;
+class ContextScope;
/** Representation of a phrase, ie. a contiguous number of words.
* Wrapper for vector of words
@@ -53,17 +54,26 @@ protected:
public:
- /// return shared pointer to ttask
- // only TargetPhrases have non-NULL ttaskptrs!
- virtual ttasksptr GetTtask() const {
- return ttasksptr();
- }
+ // /// return shared pointer to ttask
+ // // only TargetPhrases have non-NULL ttaskptrs!
+ // virtual ttasksptr GetTtask() const {
+ // return ttasksptr();
+ // }
+
+ // /// check if this phrase belongs to a valid ttask
+ // // only TargetPhrases have non-NULL ttaskptrs!
+ // virtual bool HasTtaskSPtr() const {
+ // return false;
+ // }
- /// check if this phrase belongs to a valid ttask
- // only TargetPhrases have non-NULL ttaskptrs!
- virtual bool HasTtaskSPtr() const {
+ virtual bool HasScope() const {
return false;
}
+
+ virtual SPTR<ContextScope> GetScope() const {
+ return SPTR<ContextScope>();
+ }
+
/** No longer does anything as not using mem pool for Phrase class anymore */
static void InitializeMemPool();