mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-01 00:12:27 +03:00
Merge branch 'master' of github.com:moses-smt/mosesdecoder
This commit is contained in:
commit
7681cd4a15
@ -166,6 +166,16 @@
|
|||||||
<type>1</type>
|
<type>1</type>
|
||||||
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartHypothesisCollection.h</locationURI>
|
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartHypothesisCollection.h</locationURI>
|
||||||
</link>
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>ChartKBestExtractor.cpp</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartKBestExtractor.cpp</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>ChartKBestExtractor.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartKBestExtractor.h</locationURI>
|
||||||
|
</link>
|
||||||
<link>
|
<link>
|
||||||
<name>ChartManager.cpp</name>
|
<name>ChartManager.cpp</name>
|
||||||
<type>1</type>
|
<type>1</type>
|
||||||
|
@ -521,6 +521,12 @@ int main(int argc, char** argv)
|
|||||||
myRegistry.addMethod("updater", updater);
|
myRegistry.addMethod("updater", updater);
|
||||||
myRegistry.addMethod("optimize", optimizer);
|
myRegistry.addMethod("optimize", optimizer);
|
||||||
|
|
||||||
|
xmlrpc_c::serverAbyss myAbyssServer(
|
||||||
|
myRegistry,
|
||||||
|
port, // TCP port on which to listen
|
||||||
|
logfile
|
||||||
|
);
|
||||||
|
/* doesn't work with xmlrpc-c v. 1.16.33 - ie very old lib on Ubuntu 12.04
|
||||||
xmlrpc_c::serverAbyss myAbyssServer(
|
xmlrpc_c::serverAbyss myAbyssServer(
|
||||||
xmlrpc_c::serverAbyss::constrOpt()
|
xmlrpc_c::serverAbyss::constrOpt()
|
||||||
.registryPtr(&myRegistry)
|
.registryPtr(&myRegistry)
|
||||||
@ -528,6 +534,7 @@ int main(int argc, char** argv)
|
|||||||
.logFileName(logfile)
|
.logFileName(logfile)
|
||||||
.allowOrigin("*")
|
.allowOrigin("*")
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
cerr << "Listening on port " << port << endl;
|
cerr << "Listening on port " << port << endl;
|
||||||
if (isSerial) {
|
if (isSerial) {
|
||||||
|
@ -75,9 +75,6 @@ protected:
|
|||||||
//! not implemented
|
//! not implemented
|
||||||
ChartHypothesis(const ChartHypothesis ©);
|
ChartHypothesis(const ChartHypothesis ©);
|
||||||
|
|
||||||
//! only used by ChartKBestExtractor
|
|
||||||
ChartHypothesis(const ChartHypothesis &, const ChartKBestExtractor &);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifdef USE_HYPO_POOL
|
#ifdef USE_HYPO_POOL
|
||||||
void *operator new(size_t /* num_bytes */) {
|
void *operator new(size_t /* num_bytes */) {
|
||||||
@ -96,6 +93,9 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//! only used by ChartKBestExtractor
|
||||||
|
ChartHypothesis(const ChartHypothesis &, const ChartKBestExtractor &);
|
||||||
|
|
||||||
ChartHypothesis(const ChartTranslationOptions &, const RuleCubeItem &item,
|
ChartHypothesis(const ChartTranslationOptions &, const RuleCubeItem &item,
|
||||||
ChartManager &manager);
|
ChartManager &manager);
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ void ChartKBestExtractor::Extract(
|
|||||||
for (KBestVec::const_iterator p = top->kBestList.begin();
|
for (KBestVec::const_iterator p = top->kBestList.begin();
|
||||||
p != top->kBestList.end(); ++p) {
|
p != top->kBestList.end(); ++p) {
|
||||||
const Derivation &d = **p;
|
const Derivation &d = **p;
|
||||||
assert(d.edge->tail.size() == 1); // d should have exactly one predecessor.
|
assert(d.edge.tail.size() == 1); // d should have exactly one predecessor.
|
||||||
assert(d.backPointers.size() == 1);
|
assert(d.backPointers.size() == 1);
|
||||||
std::size_t i = d.backPointers[0];
|
std::size_t i = d.backPointers[0];
|
||||||
boost::shared_ptr<Derivation> pred = d.edge.tail[0]->kBestList[i];
|
boost::shared_ptr<Derivation> pred = d.edge.tail[0]->kBestList[i];
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
#include "ChartHypothesis.h"
|
#include "ChartHypothesis.h"
|
||||||
#include "ScoreComponentCollection.h"
|
#include "ScoreComponentCollection.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user