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 <hieuhoang@gmail.com>2013-12-02 19:29:13 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-12-02 19:29:13 +0400
commit04cbbc48cfff58108ef6404a471f894111e51c41 (patch)
treed4a5be9822a77a80667d65760edeeed20acb280d /moses/InputPath.h
parentec4fe7a46586daedd582afd9faf1ad03232c13bd (diff)
add phrase-table wrapper for Nadir's transliteration code
Diffstat (limited to 'moses/InputPath.h')
-rw-r--r--moses/InputPath.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/moses/InputPath.h b/moses/InputPath.h
index bef5e7744..1473cedd1 100644
--- a/moses/InputPath.h
+++ b/moses/InputPath.h
@@ -29,6 +29,9 @@ class InputPath
{
friend std::ostream& operator<<(std::ostream& out, const InputPath &obj);
+public:
+ typedef std::map<const PhraseDictionary*, std::pair<const TargetPhraseCollection*, const void*> > TargetPhrases;
+
protected:
const InputPath *m_prevPath;
Phrase m_phrase;
@@ -37,7 +40,7 @@ protected:
size_t m_nextNode; // distance to next node. For lattices
// for phrase-based model only
- std::map<const PhraseDictionary*, std::pair<const TargetPhraseCollection*, const void*> > m_targetPhrases;
+ TargetPhrases m_targetPhrases;
// for syntax model only
mutable std::vector<std::vector<const Word*> > m_ruleSourceFromInputPath;
@@ -84,6 +87,8 @@ public:
, const TargetPhraseCollection *targetPhrases
, const void *ptNode);
const TargetPhraseCollection *GetTargetPhrases(const PhraseDictionary &phraseDictionary) const;
+ const TargetPhrases &GetTargetPhrases() const
+ { return m_targetPhrases; }
// pointer to internal node in phrase-table. Since this is implementation dependent, this is a void*
const void *GetPtNode(const PhraseDictionary &phraseDictionary) const;