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-06-24 17:45:20 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-06-24 17:45:20 +0400
commit69acbfa1d387a687bd36639f8a7a793f81749b2f (patch)
treebc60ff69218c5c535cc908493d76a61d5b5e7b29 /moses/Word.h
parentcf55ab6678343b3245cb41f2875678bdfed961c5 (diff)
compiles, but only on eclipse
Diffstat (limited to 'moses/Word.h')
-rw-r--r--moses/Word.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/moses/Word.h b/moses/Word.h
index e88b0441b..efce4e187 100644
--- a/moses/Word.h
+++ b/moses/Word.h
@@ -52,11 +52,14 @@ protected:
FactorArray m_factorArray; /**< set of factors */
bool m_isNonTerminal;
+ bool m_isOOV;
public:
/** deep copy */
Word(const Word &copy)
- :m_isNonTerminal(copy.m_isNonTerminal) {
+ :m_isNonTerminal(copy.m_isNonTerminal)
+ ,m_isOOV(copy.m_isOOV)
+ {
std::memcpy(m_factorArray, copy.m_factorArray, sizeof(FactorArray));
}
@@ -64,6 +67,7 @@ public:
explicit Word(bool isNonTerminal = false) {
std::memset(m_factorArray, 0, sizeof(FactorArray));
m_isNonTerminal = isNonTerminal;
+ m_isOOV = false;
}
~Word() {}
@@ -92,6 +96,13 @@ public:
m_isNonTerminal = val;
}
+ inline bool IsOOV() const {
+ return m_isOOV;
+ }
+ inline void SetIsOOV(bool val) {
+ m_isOOV = val;
+ }
+
/** add the factors from sourceWord into this representation,
* NULL elements in sourceWord will be skipped */
void Merge(const Word &sourceWord);