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:
authorMosesAdmin <moses-support-owner@mit.edu>2015-10-19 02:00:40 +0300
committerMosesAdmin <moses-support-owner@mit.edu>2015-10-19 02:00:40 +0300
commitd757346b55cf497f7a6887b00c1a84402f33f374 (patch)
tree30a3b680d2557ee81028d5c8ceb14dbcb834c1d2 /moses/Syntax
parentb8b3d2111a20c6f401291160a01db4bc03ce3676 (diff)
daily automatic beautifier
Diffstat (limited to 'moses/Syntax')
-rw-r--r--moses/Syntax/F2S/GlueRuleSynthesizer.cpp4
-rw-r--r--moses/Syntax/F2S/HyperTree.h6
-rw-r--r--moses/Syntax/F2S/HyperTreeLoader.cpp4
-rw-r--r--moses/Syntax/F2S/RuleMatcherHyperTree-inl.h4
-rw-r--r--moses/Syntax/S2T/OovHandler-inl.h2
-rw-r--r--moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h4
-rw-r--r--moses/Syntax/S2T/RuleTrie.h8
-rw-r--r--moses/Syntax/S2T/RuleTrieCYKPlus.cpp8
-rw-r--r--moses/Syntax/S2T/RuleTrieCYKPlus.h4
-rw-r--r--moses/Syntax/S2T/RuleTrieCreator.h4
-rw-r--r--moses/Syntax/S2T/RuleTrieLoader.cpp6
-rw-r--r--moses/Syntax/S2T/RuleTrieScope3.cpp6
-rw-r--r--moses/Syntax/S2T/RuleTrieScope3.h12
-rw-r--r--moses/Syntax/T2S/GlueRuleSynthesizer.cpp4
-rw-r--r--moses/Syntax/T2S/RuleTrie.cpp8
-rw-r--r--moses/Syntax/T2S/RuleTrie.h10
-rw-r--r--moses/Syntax/T2S/RuleTrieLoader.cpp8
17 files changed, 51 insertions, 51 deletions
diff --git a/moses/Syntax/F2S/GlueRuleSynthesizer.cpp b/moses/Syntax/F2S/GlueRuleSynthesizer.cpp
index e83daa81b..3ba5a26d3 100644
--- a/moses/Syntax/F2S/GlueRuleSynthesizer.cpp
+++ b/moses/Syntax/F2S/GlueRuleSynthesizer.cpp
@@ -28,8 +28,8 @@ void GlueRuleSynthesizer::SynthesizeRule(const Forest::Hyperedge &e)
HyperPath source;
SynthesizeHyperPath(e, source);
TargetPhrase *tp = SynthesizeTargetPhrase(e);
- TargetPhraseCollection::shared_ptr tpc
- = GetOrCreateTargetPhraseCollection(m_hyperTree, source);
+ TargetPhraseCollection::shared_ptr tpc
+ = GetOrCreateTargetPhraseCollection(m_hyperTree, source);
tpc->Add(tp);
}
diff --git a/moses/Syntax/F2S/HyperTree.h b/moses/Syntax/F2S/HyperTree.h
index a000e9f9b..8e33451a8 100644
--- a/moses/Syntax/F2S/HyperTree.h
+++ b/moses/Syntax/F2S/HyperTree.h
@@ -47,12 +47,12 @@ public:
const Node *GetChild(const HyperPath::NodeSeq &) const;
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetTargetPhraseCollection() const {
return m_targetPhraseCollection;
}
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetTargetPhraseCollection() {
return m_targetPhraseCollection;
}
@@ -77,7 +77,7 @@ public:
private:
friend class HyperTreeCreator;
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetOrCreateTargetPhraseCollection(const HyperPath &);
Node &GetOrCreateNode(const HyperPath &);
diff --git a/moses/Syntax/F2S/HyperTreeLoader.cpp b/moses/Syntax/F2S/HyperTreeLoader.cpp
index 6764963ac..aefddbc2d 100644
--- a/moses/Syntax/F2S/HyperTreeLoader.cpp
+++ b/moses/Syntax/F2S/HyperTreeLoader.cpp
@@ -130,8 +130,8 @@ bool HyperTreeLoader::Load(const std::vector<FactorType> &input,
ff.GetFeaturesToApply());
// Add rule to trie.
- TargetPhraseCollection::shared_ptr phraseColl
- = GetOrCreateTargetPhraseCollection(trie, sourceFragment);
+ TargetPhraseCollection::shared_ptr phraseColl
+ = GetOrCreateTargetPhraseCollection(trie, sourceFragment);
phraseColl->Add(targetPhrase);
count++;
diff --git a/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h b/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h
index bf05d4bcc..36dfeced2 100644
--- a/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h
+++ b/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h
@@ -51,8 +51,8 @@ void RuleMatcherHyperTree<Callback>::EnumerateHyperedges(
m_hyperedge.label.inputWeight += (*p)->weight;
}
// Set the output hyperedge label's translation set pointer.
- m_hyperedge.label.translations
- = item.trieNode->GetTargetPhraseCollection();
+ m_hyperedge.label.translations
+ = item.trieNode->GetTargetPhraseCollection();
// Pass the output hyperedge to the callback.
callback(m_hyperedge);
}
diff --git a/moses/Syntax/S2T/OovHandler-inl.h b/moses/Syntax/S2T/OovHandler-inl.h
index e5ffe6370..9f26563d5 100644
--- a/moses/Syntax/S2T/OovHandler-inl.h
+++ b/moses/Syntax/S2T/OovHandler-inl.h
@@ -33,7 +33,7 @@ boost::shared_ptr<RuleTrie> OovHandler<RuleTrie>::SynthesizeRuleTrie(
Word *tgtLHS = SynthesizeTargetLhs(targetLhsStr);
TargetPhrase *tp = SynthesizeTargetPhrase(oov, *srcPhrase, *tgtLHS, prob);
TargetPhraseCollection::shared_ptr tpc;
- tpc= GetOrCreateTargetPhraseCollection(*trie, *srcPhrase, *tp, NULL);
+ tpc= GetOrCreateTargetPhraseCollection(*trie, *srcPhrase, *tp, NULL);
// TODO Check NULL is valid argument
tpc->Add(tp);
}
diff --git a/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h b/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h
index 407f04d5b..5ee32553e 100644
--- a/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h
+++ b/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h
@@ -25,8 +25,8 @@ public:
, m_key(key)
, m_ranges(ranges) {}
- void Search(const std::vector<int> &labels,
- const TargetPhraseCollection::shared_ptr tpc,
+ void Search(const std::vector<int> &labels,
+ const TargetPhraseCollection::shared_ptr tpc,
Callback &callback) {
m_labels = &labels;
m_matchCB = &callback;
diff --git a/moses/Syntax/S2T/RuleTrie.h b/moses/Syntax/S2T/RuleTrie.h
index b9d031673..eee6edd5b 100644
--- a/moses/Syntax/S2T/RuleTrie.h
+++ b/moses/Syntax/S2T/RuleTrie.h
@@ -28,10 +28,10 @@ public:
private:
friend class RuleTrieCreator;
- virtual TargetPhraseCollection::shared_ptr
- GetOrCreateTargetPhraseCollection(const Phrase &source,
- const TargetPhrase &target,
- const Word *sourceLHS) = 0;
+ virtual TargetPhraseCollection::shared_ptr
+ GetOrCreateTargetPhraseCollection(const Phrase &source,
+ const TargetPhrase &target,
+ const Word *sourceLHS) = 0;
virtual void SortAndPrune(std::size_t) = 0;
};
diff --git a/moses/Syntax/S2T/RuleTrieCYKPlus.cpp b/moses/Syntax/S2T/RuleTrieCYKPlus.cpp
index 7c8d08864..68da5f5b7 100644
--- a/moses/Syntax/S2T/RuleTrieCYKPlus.cpp
+++ b/moses/Syntax/S2T/RuleTrieCYKPlus.cpp
@@ -86,11 +86,11 @@ const RuleTrieCYKPlus::Node *RuleTrieCYKPlus::Node::GetNonTerminalChild(
return (p == m_nonTermMap.end()) ? NULL : &p->second;
}
-TargetPhraseCollection::shared_ptr
+TargetPhraseCollection::shared_ptr
RuleTrieCYKPlus::
-GetOrCreateTargetPhraseCollection(const Phrase &source,
- const TargetPhrase &target,
- const Word *sourceLHS)
+GetOrCreateTargetPhraseCollection(const Phrase &source,
+ const TargetPhrase &target,
+ const Word *sourceLHS)
{
Node &currNode = GetOrCreateNode(source, target, sourceLHS);
return currNode.GetTargetPhraseCollection();
diff --git a/moses/Syntax/S2T/RuleTrieCYKPlus.h b/moses/Syntax/S2T/RuleTrieCYKPlus.h
index 0c11a1edb..31880e0ed 100644
--- a/moses/Syntax/S2T/RuleTrieCYKPlus.h
+++ b/moses/Syntax/S2T/RuleTrieCYKPlus.h
@@ -50,12 +50,12 @@ public:
const Node *GetChild(const Word &sourceTerm) const;
const Node *GetNonTerminalChild(const Word &targetNonTerm) const;
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetTargetPhraseCollection() const {
return m_targetPhraseCollection;
}
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetTargetPhraseCollection() {
return m_targetPhraseCollection;
}
diff --git a/moses/Syntax/S2T/RuleTrieCreator.h b/moses/Syntax/S2T/RuleTrieCreator.h
index 62da519a1..84a4a1636 100644
--- a/moses/Syntax/S2T/RuleTrieCreator.h
+++ b/moses/Syntax/S2T/RuleTrieCreator.h
@@ -21,9 +21,9 @@ protected:
// Provide access to RuleTrie's private GetOrCreateTargetPhraseCollection
// function.
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetOrCreateTargetPhraseCollection
- ( RuleTrie &trie, const Phrase &source, const TargetPhrase &target,
+ ( RuleTrie &trie, const Phrase &source, const TargetPhrase &target,
const Word *sourceLHS) {
return trie.GetOrCreateTargetPhraseCollection(source, target, sourceLHS);
}
diff --git a/moses/Syntax/S2T/RuleTrieLoader.cpp b/moses/Syntax/S2T/RuleTrieLoader.cpp
index b523953c7..3ac266bdb 100644
--- a/moses/Syntax/S2T/RuleTrieLoader.cpp
+++ b/moses/Syntax/S2T/RuleTrieLoader.cpp
@@ -125,9 +125,9 @@ bool RuleTrieLoader::Load(const std::vector<FactorType> &input,
targetPhrase->GetScoreBreakdown().Assign(&ff, scoreVector);
targetPhrase->EvaluateInIsolation(sourcePhrase, ff.GetFeaturesToApply());
- TargetPhraseCollection::shared_ptr phraseColl
- = GetOrCreateTargetPhraseCollection(trie, sourcePhrase,
- *targetPhrase, sourceLHS);
+ TargetPhraseCollection::shared_ptr phraseColl
+ = GetOrCreateTargetPhraseCollection(trie, sourcePhrase,
+ *targetPhrase, sourceLHS);
phraseColl->Add(targetPhrase);
// not implemented correctly in memory pt. just delete it for now
diff --git a/moses/Syntax/S2T/RuleTrieScope3.cpp b/moses/Syntax/S2T/RuleTrieScope3.cpp
index aecaac3f7..ceaee9501 100644
--- a/moses/Syntax/S2T/RuleTrieScope3.cpp
+++ b/moses/Syntax/S2T/RuleTrieScope3.cpp
@@ -102,9 +102,9 @@ GetOrCreateTargetPhraseCollection(const TargetPhrase &target)
TargetPhraseCollection::shared_ptr
RuleTrieScope3::
-GetOrCreateTargetPhraseCollection(const Phrase &source,
- const TargetPhrase &target,
- const Word *sourceLHS)
+GetOrCreateTargetPhraseCollection(const Phrase &source,
+ const TargetPhrase &target,
+ const Word *sourceLHS)
{
Node &currNode = GetOrCreateNode(source, target, sourceLHS);
return currNode.GetOrCreateTargetPhraseCollection(target);
diff --git a/moses/Syntax/S2T/RuleTrieScope3.h b/moses/Syntax/S2T/RuleTrieScope3.h
index 4684e8a78..97c939961 100644
--- a/moses/Syntax/S2T/RuleTrieScope3.h
+++ b/moses/Syntax/S2T/RuleTrieScope3.h
@@ -35,7 +35,7 @@ public:
SymbolEqualityPred> TerminalMap;
typedef boost::unordered_map<std::vector<int>,
- TargetPhraseCollection::shared_ptr> LabelMap;
+ TargetPhraseCollection::shared_ptr> LabelMap;
~Node() {
delete m_gapNode;
@@ -61,7 +61,7 @@ public:
Node *GetOrCreateNonTerminalChild(const Word &targetNonTerm);
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetOrCreateTargetPhraseCollection(const TargetPhrase &);
bool IsLeaf() const {
@@ -106,10 +106,10 @@ public:
bool HasPreterminalRule(const Word &) const;
private:
- TargetPhraseCollection::shared_ptr
- GetOrCreateTargetPhraseCollection(const Phrase &source,
- const TargetPhrase &target,
- const Word *sourceLHS);
+ TargetPhraseCollection::shared_ptr
+ GetOrCreateTargetPhraseCollection(const Phrase &source,
+ const TargetPhrase &target,
+ const Word *sourceLHS);
Node &GetOrCreateNode(const Phrase &source, const TargetPhrase &target,
const Word *sourceLHS);
diff --git a/moses/Syntax/T2S/GlueRuleSynthesizer.cpp b/moses/Syntax/T2S/GlueRuleSynthesizer.cpp
index 7514852f2..f50f84629 100644
--- a/moses/Syntax/T2S/GlueRuleSynthesizer.cpp
+++ b/moses/Syntax/T2S/GlueRuleSynthesizer.cpp
@@ -17,8 +17,8 @@ void GlueRuleSynthesizer::SynthesizeRule(const InputTree::Node &node)
const Word &sourceLhs = node.pvertex.symbol;
boost::scoped_ptr<Phrase> sourceRhs(SynthesizeSourcePhrase(node));
TargetPhrase *tp = SynthesizeTargetPhrase(node, *sourceRhs);
- TargetPhraseCollection::shared_ptr tpc
- = GetOrCreateTargetPhraseCollection(m_ruleTrie, sourceLhs, *sourceRhs);
+ TargetPhraseCollection::shared_ptr tpc
+ = GetOrCreateTargetPhraseCollection(m_ruleTrie, sourceLhs, *sourceRhs);
tpc->Add(tp);
}
diff --git a/moses/Syntax/T2S/RuleTrie.cpp b/moses/Syntax/T2S/RuleTrie.cpp
index e6fc5214c..fb5ae7108 100644
--- a/moses/Syntax/T2S/RuleTrie.cpp
+++ b/moses/Syntax/T2S/RuleTrie.cpp
@@ -76,15 +76,15 @@ GetOrCreateNonTerminalChild(const Word &targetNonTerm)
return &m_nonTermMap[targetNonTerm];
}
-TargetPhraseCollection::shared_ptr
+TargetPhraseCollection::shared_ptr
RuleTrie::
Node::
GetOrCreateTargetPhraseCollection(const Word &sourceLHS)
{
UTIL_THROW_IF2(!sourceLHS.IsNonTerminal(),
"Not a non-terminal: " << sourceLHS);
- TargetPhraseCollection::shared_ptr& foo
- = m_targetPhraseCollections[sourceLHS];
+ TargetPhraseCollection::shared_ptr& foo
+ = m_targetPhraseCollections[sourceLHS];
if (!foo) foo.reset(new TargetPhraseCollection);
return foo;
}
@@ -110,7 +110,7 @@ GetNonTerminalChild(const Word &targetNonTerm) const
return (p == m_nonTermMap.end()) ? NULL : &p->second;
}
-TargetPhraseCollection::shared_ptr
+TargetPhraseCollection::shared_ptr
RuleTrie::
GetOrCreateTargetPhraseCollection
( const Word &sourceLHS, const Phrase &sourceRHS )
diff --git a/moses/Syntax/T2S/RuleTrie.h b/moses/Syntax/T2S/RuleTrie.h
index f9d857088..16b9e735f 100644
--- a/moses/Syntax/T2S/RuleTrie.h
+++ b/moses/Syntax/T2S/RuleTrie.h
@@ -53,13 +53,13 @@ public:
const Node *GetChild(const Word &sourceTerm) const;
const Node *GetNonTerminalChild(const Word &targetNonTerm) const;
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetTargetPhraseCollection(const Word &sourceLHS) const {
TPCMap::const_iterator p = m_targetPhraseCollections.find(sourceLHS);
- if (p != m_targetPhraseCollections.end())
- return p->second;
+ if (p != m_targetPhraseCollections.end())
+ return p->second;
else
- return TargetPhraseCollection::shared_ptr();
+ return TargetPhraseCollection::shared_ptr();
}
// FIXME IS there any reason to distinguish these two for T2S?
@@ -86,7 +86,7 @@ public:
private:
friend class RuleTrieCreator;
- TargetPhraseCollection::shared_ptr
+ TargetPhraseCollection::shared_ptr
GetOrCreateTargetPhraseCollection
(const Word &sourceLHS, const Phrase &sourceRHS);
diff --git a/moses/Syntax/T2S/RuleTrieLoader.cpp b/moses/Syntax/T2S/RuleTrieLoader.cpp
index c96c52b03..f0646b1f7 100644
--- a/moses/Syntax/T2S/RuleTrieLoader.cpp
+++ b/moses/Syntax/T2S/RuleTrieLoader.cpp
@@ -56,8 +56,8 @@ bool RuleTrieLoader::Load(const std::vector<FactorType> &input,
StringPiece line;
int noflags = double_conversion::StringToDoubleConverter::NO_FLAGS;
- double_conversion::StringToDoubleConverter
- converter(noflags, NAN, NAN, "inf", "nan");
+ double_conversion::StringToDoubleConverter
+ converter(noflags, NAN, NAN, "inf", "nan");
while(true) {
try {
@@ -134,8 +134,8 @@ bool RuleTrieLoader::Load(const std::vector<FactorType> &input,
targetPhrase->GetScoreBreakdown().Assign(&ff, scoreVector);
targetPhrase->EvaluateInIsolation(sourcePhrase, ff.GetFeaturesToApply());
- TargetPhraseCollection::shared_ptr phraseColl
- = GetOrCreateTargetPhraseCollection(trie, *sourceLHS, sourcePhrase);
+ TargetPhraseCollection::shared_ptr phraseColl
+ = GetOrCreateTargetPhraseCollection(trie, *sourceLHS, sourcePhrase);
phraseColl->Add(targetPhrase);
// not implemented correctly in memory pt. just delete it for now