mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-29 06:52:34 +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>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartHypothesisCollection.h</locationURI>
|
||||
</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>
|
||||
<name>ChartManager.cpp</name>
|
||||
<type>1</type>
|
||||
|
@ -521,6 +521,12 @@ int main(int argc, char** argv)
|
||||
myRegistry.addMethod("updater", updater);
|
||||
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::constrOpt()
|
||||
.registryPtr(&myRegistry)
|
||||
@ -528,6 +534,7 @@ int main(int argc, char** argv)
|
||||
.logFileName(logfile)
|
||||
.allowOrigin("*")
|
||||
);
|
||||
*/
|
||||
|
||||
cerr << "Listening on port " << port << endl;
|
||||
if (isSerial) {
|
||||
|
@ -75,9 +75,6 @@ protected:
|
||||
//! not implemented
|
||||
ChartHypothesis(const ChartHypothesis ©);
|
||||
|
||||
//! only used by ChartKBestExtractor
|
||||
ChartHypothesis(const ChartHypothesis &, const ChartKBestExtractor &);
|
||||
|
||||
public:
|
||||
#ifdef USE_HYPO_POOL
|
||||
void *operator new(size_t /* num_bytes */) {
|
||||
@ -96,6 +93,9 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
//! only used by ChartKBestExtractor
|
||||
ChartHypothesis(const ChartHypothesis &, const ChartKBestExtractor &);
|
||||
|
||||
ChartHypothesis(const ChartTranslationOptions &, const RuleCubeItem &item,
|
||||
ChartManager &manager);
|
||||
|
||||
|
@ -73,7 +73,7 @@ void ChartKBestExtractor::Extract(
|
||||
for (KBestVec::const_iterator p = top->kBestList.begin();
|
||||
p != top->kBestList.end(); ++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);
|
||||
std::size_t i = d.backPointers[0];
|
||||
boost::shared_ptr<Derivation> pred = d.edge.tail[0]->kBestList[i];
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include "ChartHypothesis.h"
|
||||
#include "ScoreComponentCollection.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user