mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 21:42:19 +03:00
Fix chart decoding so that it allows inputtype=0
This commit is contained in:
parent
cd5d84f800
commit
31f725a2b6
@ -126,8 +126,7 @@ void ChartManager::ProcessSentence()
|
||||
}
|
||||
|
||||
void ChartManager::AddXmlChartOptions() {
|
||||
TreeInput const &source = dynamic_cast<TreeInput const&>(m_source);
|
||||
const std::vector <ChartTranslationOption*> xmlChartOptionsList = source.GetXmlChartTranslationOptions();
|
||||
const std::vector <ChartTranslationOption*> xmlChartOptionsList = m_source.GetXmlChartTranslationOptions();
|
||||
IFVERBOSE(2) { cerr << "AddXmlChartOptions " << xmlChartOptionsList.size() << endl; }
|
||||
if (xmlChartOptionsList.size() == 0) return;
|
||||
|
||||
|
@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include <cstdlib>
|
||||
|
||||
#include "InputType.h"
|
||||
#include "ChartTranslationOption.h"
|
||||
|
||||
namespace Moses
|
||||
{
|
||||
@ -60,6 +61,13 @@ bool InputType::CanIGetFromAToB(size_t /*start*/, size_t /*end*/) const
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector <ChartTranslationOption*> InputType::GetXmlChartTranslationOptions() const
|
||||
{
|
||||
// default. return nothing
|
||||
std::vector <ChartTranslationOption*> ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,7 +38,8 @@ class Factor;
|
||||
class PhraseDictionary;
|
||||
class TranslationOptionCollection;
|
||||
class TranslationSystem;
|
||||
|
||||
class ChartTranslationOption;
|
||||
|
||||
//! base class for sentences and confusion networks
|
||||
class InputType
|
||||
{
|
||||
@ -130,6 +131,8 @@ public:
|
||||
|
||||
virtual const NonTerminalSet &GetLabelSet(size_t startPos, size_t endPos) const = 0;
|
||||
|
||||
virtual std::vector <ChartTranslationOption*> GetXmlChartTranslationOptions() const;
|
||||
|
||||
TO_STRING();
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user