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:
authorHieu Hoang <hieu@hoang.co.uk>2013-07-31 15:25:34 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-07-31 15:25:34 +0400
commitba187294d5aa54e4e039623a283abcb20edb94ad (patch)
tree6a885a146a23f44946e9c93f72bf99b98a0edd11 /moses/ChartRuleLookupManager.h
parent231c32fae9bf9c3a0042909405e6c1f1386d2938 (diff)
begin cleanup of SCFG parsing. Get rid of Sentence variable in ChartRuleLookupManager, replace with ChartParser variable
Diffstat (limited to 'moses/ChartRuleLookupManager.h')
-rw-r--r--moses/ChartRuleLookupManager.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/moses/ChartRuleLookupManager.h b/moses/ChartRuleLookupManager.h
index ad936ff9c..0d26bd7ee 100644
--- a/moses/ChartRuleLookupManager.h
+++ b/moses/ChartRuleLookupManager.h
@@ -26,9 +26,10 @@
namespace Moses
{
-
+class ChartParser;
class ChartParserCallback;
class WordsRange;
+class Sentence;
/** Defines an interface for looking up rules in a rule table. Concrete
* implementation classes should correspond to specific PhraseDictionary
@@ -39,22 +40,19 @@ class WordsRange;
class ChartRuleLookupManager
{
public:
- ChartRuleLookupManager(const InputType &sentence,
+ ChartRuleLookupManager(const ChartParser &parser,
const ChartCellCollectionBase &cellColl)
- : m_sentence(sentence)
+ : m_parser(parser)
, m_cellCollection(cellColl) {}
virtual ~ChartRuleLookupManager() {}
- //! the sentence being decoded
- const InputType &GetSentence() const {
- return m_sentence;
- }
-
const ChartCellLabelSet &GetTargetLabelSet(size_t begin, size_t end) const {
return m_cellCollection.GetBase(WordsRange(begin, end)).GetTargetLabelSet();
}
+ const Sentence &GetSentence() const;
+
const ChartCellLabel &GetSourceAt(size_t at) const {
return m_cellCollection.GetSourceWordLabel(at);
}
@@ -73,7 +71,7 @@ private:
//! Non-copyable: copy constructor and assignment operator not implemented.
ChartRuleLookupManager &operator=(const ChartRuleLookupManager &);
- const InputType &m_sentence;
+ const ChartParser &m_parser;
const ChartCellCollectionBase &m_cellCollection;
};