mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
debug function for ChartTranslationOptionList and ChartTranslationOptions
This commit is contained in:
parent
ebc6e59b17
commit
fb356606e9
@ -165,4 +165,13 @@ void ChartTranslationOptionList::Evaluate(const InputType &input, const InputPat
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream &out, const ChartTranslationOptionList &obj)
|
||||
{
|
||||
for (size_t i = 0; i < obj.m_collection.size(); ++i) {
|
||||
const ChartTranslationOptions &transOpts = *obj.m_collection[i];
|
||||
out << transOpts << endl;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ class InputPath;
|
||||
//! a vector of translations options for a specific range, in a specific sentence
|
||||
class ChartTranslationOptionList : public ChartParserCallback
|
||||
{
|
||||
friend std::ostream& operator<<(std::ostream&, const ChartTranslationOptionList&);
|
||||
|
||||
public:
|
||||
ChartTranslationOptionList(size_t ruleLimit, const InputType &input);
|
||||
~ChartTranslationOptionList();
|
||||
|
@ -135,4 +135,14 @@ void ChartTranslationOptions::CreateSourceRuleFromInputPath()
|
||||
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream &out, const ChartTranslationOptions &obj)
|
||||
{
|
||||
for (size_t i = 0; i < obj.m_collection.size(); ++i) {
|
||||
const ChartTranslationOption &transOpt = *obj.m_collection[i];
|
||||
out << transOpt << endl;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,6 +39,8 @@ class InputType;
|
||||
*/
|
||||
class ChartTranslationOptions
|
||||
{
|
||||
friend std::ostream& operator<<(std::ostream&, const ChartTranslationOptions&);
|
||||
|
||||
public:
|
||||
typedef std::vector<boost::shared_ptr<ChartTranslationOption> > CollType;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user