mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-16 15:00:33 +03:00
daily automatic beautifier
This commit is contained in:
parent
858a509d53
commit
dad1bd6127
@ -112,9 +112,9 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
std::cerr << "Querying: "
|
||||
<< "f='" << f.GetStringRep(f_mask) <<"' "
|
||||
<< "e='" << e.GetStringRep(e_mask) << "' "
|
||||
<< "c='" << c.GetStringRep(c_mask) << "'\n";
|
||||
<< "f='" << f.GetStringRep(f_mask) <<"' "
|
||||
<< "e='" << e.GetStringRep(e_mask) << "' "
|
||||
<< "c='" << c.GetStringRep(c_mask) << "'\n";
|
||||
std::cerr << table->GetScore(f,e,c) << "\n";
|
||||
//table->DbgDump(&std::cerr);
|
||||
delete table;
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
if (!consumed) {
|
||||
// newargv[newargc] = new char[strlen(argv[i]) + 1];
|
||||
// strcpy(newargv[newargc],argv[i]);
|
||||
newargv[newargc] = argv[i];
|
||||
newargv[newargc] = argv[i];
|
||||
++newargc;
|
||||
}
|
||||
}
|
||||
|
@ -854,7 +854,7 @@ void ChartManager::OutputBestHypo(OutputCollector *collector, const ChartHypothe
|
||||
outPhrase.RemoveWord(outPhrase.GetSize() - 1);
|
||||
|
||||
const std::vector<FactorType> outputFactorOrder
|
||||
= StaticData::Instance().GetOutputFactorOrder();
|
||||
= StaticData::Instance().GetOutputFactorOrder();
|
||||
string output = outPhrase.GetStringRep(outputFactorOrder);
|
||||
out << output << endl;
|
||||
} else {
|
||||
|
@ -477,7 +477,7 @@ OutputSurface(std::ostream &out, const Hypothesis &edge,
|
||||
out << phrase;
|
||||
} else {
|
||||
FactorType placeholderFactor
|
||||
= StaticData::Instance().options().input.placeholder_factor;
|
||||
= StaticData::Instance().options().input.placeholder_factor;
|
||||
|
||||
std::map<size_t, const Factor*> placeholders;
|
||||
if (placeholderFactor != NOT_FOUND) {
|
||||
|
@ -219,15 +219,15 @@ Parameter::Parameter()
|
||||
AddParam(server_opts,"serial", "Run server in serial mode, processing only one request at a time.");
|
||||
|
||||
AddParam(server_opts,"server-maxconn",
|
||||
"Max. No of simultaneous HTTP transactions allowed by the server.");
|
||||
"Max. No of simultaneous HTTP transactions allowed by the server.");
|
||||
AddParam(server_opts,"server-maxconn-backlog",
|
||||
"Max. No. of requests the OS will queue if the server is busy.");
|
||||
"Max. No. of requests the OS will queue if the server is busy.");
|
||||
AddParam(server_opts,"server-keepalive-maxconn",
|
||||
"Max. No. of requests the server will accept on a single TCP connection.");
|
||||
"Max. No. of requests the server will accept on a single TCP connection.");
|
||||
AddParam(server_opts,"server-keepalive-timeout",
|
||||
"Max. number of seconds the server will keep a persistent connection alive.");
|
||||
"Max. number of seconds the server will keep a persistent connection alive.");
|
||||
AddParam(server_opts,"server-timeout",
|
||||
"Max. number of seconds the server will wait for a client to submit a request once a connection has been established.");
|
||||
"Max. number of seconds the server will wait for a client to submit a request once a connection has been established.");
|
||||
|
||||
// session timeout and session cache size are for moses translation session handling
|
||||
// they have nothing to do with the abyss server (but relate to the moses server)
|
||||
@ -1353,7 +1353,7 @@ FindParam(const string ¶mSwitch, int argc, char const* argv[])
|
||||
void
|
||||
Parameter::
|
||||
OverwriteParam(const string ¶mSwitch, const string ¶mName,
|
||||
int argc, char const* argv[])
|
||||
int argc, char const* argv[])
|
||||
{
|
||||
int startPos = -1;
|
||||
for (int i = 0 ; i < argc ; i++) {
|
||||
|
@ -59,7 +59,7 @@ protected:
|
||||
|
||||
std::string FindParam(const std::string ¶mSwitch, int argc, char const* argv[]);
|
||||
void OverwriteParam(const std::string ¶mSwitch, const std::string ¶mName,
|
||||
int argc, char const* argv[]);
|
||||
int argc, char const* argv[]);
|
||||
bool ReadConfigFile(const std::string &filePath );
|
||||
bool FilesExist(const std::string ¶mName, int fieldNo, std::vector<std::string> const& fileExtension=std::vector<std::string>(1,""));
|
||||
bool isOption(const char* token);
|
||||
|
@ -448,7 +448,7 @@ CreateTranslationOptionsForRange
|
||||
for (c = partTransOptList.begin() ; c != partTransOptList.end() ; ++c) {
|
||||
TranslationOption *transOpt = *c;
|
||||
if (xml_policy != XmlConstraint ||
|
||||
!ViolatesXmlOptionsConstraint(sPos,ePos,transOpt)) {
|
||||
!ViolatesXmlOptionsConstraint(sPos,ePos,transOpt)) {
|
||||
Add(transOpt);
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ namespace Moses
|
||||
bool
|
||||
TreeInput::
|
||||
ProcessAndStripXMLTags(AllOptions const& opts, string &line,
|
||||
std::vector<XMLParseOutput> &sourceLabels,
|
||||
std::vector<XmlOption*> &xmlOptions)
|
||||
std::vector<XMLParseOutput> &sourceLabels,
|
||||
std::vector<XmlOption*> &xmlOptions)
|
||||
{
|
||||
//parse XML markup in translation line
|
||||
|
||||
|
@ -44,8 +44,8 @@ protected:
|
||||
}
|
||||
|
||||
bool ProcessAndStripXMLTags(AllOptions const& opts, std::string &line,
|
||||
std::vector<XMLParseOutput> &sourceLabels,
|
||||
std::vector<XmlOption*> &res);
|
||||
std::vector<XMLParseOutput> &sourceLabels,
|
||||
std::vector<XmlOption*> &res);
|
||||
|
||||
public:
|
||||
TreeInput() : Sentence() { }
|
||||
|
@ -209,7 +209,7 @@ Phrase TrellisPath::GetTargetPhrase() const
|
||||
Phrase TrellisPath::GetSurfacePhrase() const
|
||||
{
|
||||
const std::vector<FactorType> &outputFactor
|
||||
= manager().options().output.factor_order;
|
||||
= manager().options().output.factor_order;
|
||||
// = StaticData::Instance().GetOutputFactorOrder();
|
||||
Phrase targetPhrase = GetTargetPhrase();
|
||||
Phrase ret(targetPhrase.GetSize());
|
||||
|
@ -160,11 +160,11 @@ vector<string> TokenizeXml(const string& str, const std::string& lbrackStr, cons
|
||||
*/
|
||||
bool
|
||||
ProcessAndStripXMLTags(AllOptions const& opts, string &line, vector<XmlOption*> &res,
|
||||
ReorderingConstraint &reorderingConstraint,
|
||||
vector< size_t > &walls,
|
||||
std::vector< std::pair<size_t, std::string> > &placeholders,
|
||||
int offset, const std::string& lbrackStr,
|
||||
const std::string& rbrackStr)
|
||||
ReorderingConstraint &reorderingConstraint,
|
||||
vector< size_t > &walls,
|
||||
std::vector< std::pair<size_t, std::string> > &placeholders,
|
||||
int offset, const std::string& lbrackStr,
|
||||
const std::string& rbrackStr)
|
||||
{
|
||||
//parse XML markup in translation line
|
||||
|
||||
|
@ -30,9 +30,9 @@ std::string TrimXml(const std::string& str, const std::string& lbrackStr="<", co
|
||||
bool isXmlTag(const std::string& tag, const std::string& lbrackStr="<", const std::string& rbrackStr=">");
|
||||
std::vector<std::string> TokenizeXml(const std::string& str, const std::string& lbrackStr="<", const std::string& rbrackStr=">");
|
||||
|
||||
bool ProcessAndStripXMLTags(AllOptions const& opts,
|
||||
std::string &line, std::vector<XmlOption*> &res,
|
||||
ReorderingConstraint &reorderingConstraint, std::vector< size_t > &walls,
|
||||
bool ProcessAndStripXMLTags(AllOptions const& opts,
|
||||
std::string &line, std::vector<XmlOption*> &res,
|
||||
ReorderingConstraint &reorderingConstraint, std::vector< size_t > &walls,
|
||||
std::vector< std::pair<size_t, std::string> > &placeholders,
|
||||
int offset,
|
||||
const std::string& lbrackStr="<", const std::string& rbrackStr=">");
|
||||
|
Loading…
Reference in New Issue
Block a user