mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
use Sentence input, even for hiero/syntax model. Doesn't crash server, but doesn't give the right output either
This commit is contained in:
parent
7e0bc639c1
commit
a4e951e581
@ -3,7 +3,6 @@
|
||||
#include "moses/ContextScope.h"
|
||||
#include <boost/foreach.hpp>
|
||||
#include "moses/Util.h"
|
||||
#include "moses/TreeInput.h"
|
||||
#include "moses/Hypothesis.h"
|
||||
|
||||
namespace MosesServer
|
||||
@ -25,7 +24,6 @@ using Moses::FValue;
|
||||
using Moses::PhraseDictionaryMultiModel;
|
||||
using Moses::FindPhraseDictionary;
|
||||
using Moses::Sentence;
|
||||
using Moses::TreeInput;
|
||||
|
||||
boost::shared_ptr<TranslationRequest>
|
||||
TranslationRequest::
|
||||
@ -324,9 +322,7 @@ parse_request(std::map<std::string, xmlrpc_c::value> const& params)
|
||||
// m_bias[xmlrpc_c::value_int(tmp[i-1])] = xmlrpc_c::value_double(tmp[i]);
|
||||
// }
|
||||
if (is_syntax(m_options->search.algo)) {
|
||||
m_source.reset(new TreeInput(m_options));
|
||||
istringstream in(m_source_string + "\n");
|
||||
m_source->Read(in);
|
||||
m_source.reset(new Sentence(m_options,0,m_source_string));
|
||||
} else {
|
||||
m_source.reset(new Sentence(m_options,0,m_source_string));
|
||||
}
|
||||
@ -337,10 +333,6 @@ void
|
||||
TranslationRequest::
|
||||
run_chart_decoder()
|
||||
{
|
||||
Moses::TreeInput tinput(m_options);
|
||||
istringstream buf(m_source_string + "\n");
|
||||
tinput.Read(buf);
|
||||
|
||||
Moses::ChartManager manager(this->self());
|
||||
manager.Decode();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user