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
2e8c316aaa
2
Jamroot
2
Jamroot
@ -116,7 +116,7 @@ project : requirements
|
||||
#Add directories here if you want their incidental targets too (i.e. tests).
|
||||
build-projects lm util search moses/src mert moses-cmd/src moses-chart-cmd/src mira scripts regression-testing ;
|
||||
|
||||
alias programs : lm//programs moses-chart-cmd/src//moses_chart moses-cmd/src//programs OnDiskPt//CreateOnDiskPt OnDiskPt//queryOnDiskPt mert//programs contrib/server//mosesserver misc//programs symal phrase-extract phrase-extract//lexical-reordering phrase-extract//extract-ghkm phrase-extract//pcfg-extract phrase-extract//pcfg-score biconcor mira//mira ;
|
||||
alias programs : lm//programs moses-chart-cmd/src//moses_chart moses-cmd/src//programs OnDiskPt//CreateOnDiskPt OnDiskPt//queryOnDiskPt mert//programs misc//programs symal phrase-extract phrase-extract//lexical-reordering phrase-extract//extract-ghkm phrase-extract//pcfg-extract phrase-extract//pcfg-score biconcor mira//mira contrib/server//mosesserver ;
|
||||
|
||||
install-bin-libs programs ;
|
||||
install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-chart-cmd moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ;
|
||||
|
@ -2,9 +2,6 @@
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
|
||||
#include <xmlrpc-c/base.hpp>
|
||||
#include <xmlrpc-c/registry.hpp>
|
||||
#include <xmlrpc-c/server_abyss.hpp>
|
||||
|
||||
#include "ChartManager.h"
|
||||
#include "Hypothesis.h"
|
||||
@ -16,6 +13,10 @@
|
||||
#include "LMList.h"
|
||||
#include "LM/ORLM.h"
|
||||
|
||||
#include <xmlrpc-c/base.hpp>
|
||||
#include <xmlrpc-c/registry.hpp>
|
||||
#include <xmlrpc-c/server_abyss.hpp>
|
||||
|
||||
using namespace Moses;
|
||||
using namespace std;
|
||||
|
||||
@ -308,7 +309,7 @@ public:
|
||||
toptXml["start"] = xmlrpc_c::value_int(startPos);
|
||||
toptXml["end"] = xmlrpc_c::value_int(endPos);
|
||||
vector<xmlrpc_c::value> scoresXml;
|
||||
ScoreComponentCollection scores = topt->GetScoreBreakdown();
|
||||
const std::valarray<FValue> &scores = topt->GetScoreBreakdown().getCoreFeatures();
|
||||
for (size_t j = 0; j < scores.size(); ++j) {
|
||||
scoresXml.push_back(xmlrpc_c::value_double(scores[j]));
|
||||
}
|
||||
|
@ -169,6 +169,10 @@ namespace Moses {
|
||||
return m_coreFeatures.size();
|
||||
}
|
||||
|
||||
const std::valarray<FValue> &getCoreFeatures() const {
|
||||
return m_coreFeatures;
|
||||
}
|
||||
|
||||
/** Equality */
|
||||
bool operator== (const FVector& rhs) const;
|
||||
bool operator!= (const FVector& rhs) const;
|
||||
|
@ -119,6 +119,10 @@ public:
|
||||
return m_scores;
|
||||
}
|
||||
|
||||
const std::valarray<FValue> &getCoreFeatures() const {
|
||||
return m_scores.getCoreFeatures();
|
||||
}
|
||||
|
||||
size_t Size() const
|
||||
{
|
||||
return m_scores.size();
|
||||
|
Loading…
Reference in New Issue
Block a user