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-05-29 21:16:15 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
commit6249432407af8730c10bccc7894c0725fcaf5e47 (patch)
tree3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /moses/Incremental.h
parent59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff)
beautify
Diffstat (limited to 'moses/Incremental.h')
-rw-r--r--moses/Incremental.h57
1 files changed, 30 insertions, 27 deletions
diff --git a/moses/Incremental.h b/moses/Incremental.h
index 30f7c588c..20040bf45 100644
--- a/moses/Incremental.h
+++ b/moses/Incremental.h
@@ -10,49 +10,52 @@
#include <vector>
#include <string>
-namespace Moses {
+namespace Moses
+{
class ScoreComponentCollection;
class InputType;
class LanguageModel;
-namespace Incremental {
+namespace Incremental
+{
-class Manager {
- public:
- Manager(const InputType &source);
+class Manager
+{
+public:
+ Manager(const InputType &source);
- ~Manager();
+ ~Manager();
- template <class Model> void LMCallback(const Model &model, const std::vector<lm::WordIndex> &words);
-
- const std::vector<search::Applied> &ProcessSentence();
+ template <class Model> void LMCallback(const Model &model, const std::vector<lm::WordIndex> &words);
- // Call to get the same value as ProcessSentence returned.
- const std::vector<search::Applied> &Completed() const {
- return *completed_nbest_;
- }
+ const std::vector<search::Applied> &ProcessSentence();
- private:
- template <class Model, class Best> search::History PopulateBest(const Model &model, const std::vector<lm::WordIndex> &words, Best &out);
+ // Call to get the same value as ProcessSentence returned.
+ const std::vector<search::Applied> &Completed() const {
+ return *completed_nbest_;
+ }
- const InputType &source_;
- ChartCellCollectionBase cells_;
- ChartParser parser_;
+private:
+ template <class Model, class Best> search::History PopulateBest(const Model &model, const std::vector<lm::WordIndex> &words, Best &out);
- // Only one of single_best_ or n_best_ will be used, but it was easier to do this than a template.
- search::SingleBest single_best_;
- // ProcessSentence returns a reference to a vector. ProcessSentence
- // doesn't have one, so this is populated and returned.
- std::vector<search::Applied> backing_for_single_;
+ const InputType &source_;
+ ChartCellCollectionBase cells_;
+ ChartParser parser_;
- search::NBest n_best_;
-
- const std::vector<search::Applied> *completed_nbest_;
+ // Only one of single_best_ or n_best_ will be used, but it was easier to do this than a template.
+ search::SingleBest single_best_;
+ // ProcessSentence returns a reference to a vector. ProcessSentence
+ // doesn't have one, so this is populated and returned.
+ std::vector<search::Applied> backing_for_single_;
+
+ search::NBest n_best_;
+
+ const std::vector<search::Applied> *completed_nbest_;
};
// Just get the phrase.
void ToPhrase(const search::Applied final, Phrase &out);
-// Get the phrase and the features.
+// Get the phrase and the features.
void PhraseAndFeatures(const search::Applied final, Phrase &phrase, ScoreComponentCollection &features);