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:
authorPhil Williams <philip.williams@mac.com>2014-11-04 16:13:56 +0300
committerPhil Williams <philip.williams@mac.com>2014-11-04 16:13:56 +0300
commit5240c430cec0f78b4f14abd8b86da3764fea842c (patch)
tree3f37b70417a920a25c425ad025348b6115204122 /moses/AlignmentInfo.h
parente0b3105fc055982b8d38783d7d016535ff861718 (diff)
Merge s2t branch
This adds a new string-to-tree decoder, which can be enabled with the -s2t option. It's intended to be faster and simpler than the generic chart decoder, and is designed to support lattice input (still WIP). For a en-de system trained on WMT14 data, it's approximately 40% faster in practice. For background information, see the decoding section of the EMNLP tutorial on syntax-based MT: http://www.emnlp2014.org/tutorials/5_notes.pdf Some features are not implemented yet, including support for internal tree structure and soft source-syntactic constraints.
Diffstat (limited to 'moses/AlignmentInfo.h')
-rw-r--r--moses/AlignmentInfo.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/moses/AlignmentInfo.h b/moses/AlignmentInfo.h
index 770fa5a4e..895dde8a1 100644
--- a/moses/AlignmentInfo.h
+++ b/moses/AlignmentInfo.h
@@ -65,6 +65,12 @@ public:
return m_nonTermIndexMap;
}
+ /** Like GetNonTermIndexMap but the return value is the symbol index (i.e.
+ * the index counting both terminals and non-terminals) */
+ const NonTermIndexMap &GetNonTermIndexMap2() const {
+ return m_nonTermIndexMap2;
+ }
+
const CollType &GetAlignments() const {
return m_collection;
}
@@ -89,10 +95,11 @@ private:
//! AlignmentInfo objects should only be created by an AlignmentInfoCollection
explicit AlignmentInfo(const std::set<std::pair<size_t,size_t> > &pairs);
explicit AlignmentInfo(const std::vector<unsigned char> &aln);
- void BuildNonTermIndexMap();
+ void BuildNonTermIndexMaps();
CollType m_collection;
NonTermIndexMap m_nonTermIndexMap;
+ NonTermIndexMap m_nonTermIndexMap2;
};
/** Define an arbitrary strict weak ordering between AlignmentInfo objects