summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder/ff_const_reorder.cc2
-rw-r--r--utils/argument_reorder_model.cc2
-rw-r--r--utils/constituent_reorder_model.cc12
-rw-r--r--utils/lbfgs.h3
-rw-r--r--utils/tsuruoka_maxent.h2
5 files changed, 11 insertions, 10 deletions
diff --git a/decoder/ff_const_reorder.cc b/decoder/ff_const_reorder.cc
index d29820ef..c0269125 100644
--- a/decoder/ff_const_reorder.cc
+++ b/decoder/ff_const_reorder.cc
@@ -1339,7 +1339,7 @@ void ConstReorderFeature::PrepareForInput(const SentenceMetadata& smeta) {
void ConstReorderFeature::TraversalFeaturesImpl(
const SentenceMetadata& /* smeta */, const Hypergraph::Edge& edge,
const vector<const void*>& ant_states, SparseVector<double>* features,
- SparseVector<double>* estimated_features, void* state) const {
+ SparseVector<double>* /*estimated_features*/, void* state) const {
pimpl_->SetConstReorderFeature(edge, features, ant_states, state);
}
diff --git a/utils/argument_reorder_model.cc b/utils/argument_reorder_model.cc
index 40647f8a..5caf318f 100644
--- a/utils/argument_reorder_model.cc
+++ b/utils/argument_reorder_model.cc
@@ -263,7 +263,7 @@ inline void print_options(std::ostream& out,
if (i) out << ' ';
out << "--" << ds[i]->long_name();
}
- out << '"\n';
+ out << '\n';
}
inline string str(char const* name, po::variables_map const& conf) {
return conf[name].as<string>();
diff --git a/utils/constituent_reorder_model.cc b/utils/constituent_reorder_model.cc
index 2ff8413f..df75a1a0 100644
--- a/utils/constituent_reorder_model.cc
+++ b/utils/constituent_reorder_model.cc
@@ -80,7 +80,7 @@ struct SConstReorderTrainer {
const char* pszInstanceFname, // training instance file name
const char* pszModelPrefix, // classifier model file name prefix
int iCutoff, // feature count threshold
- const char* pszOption // other classifier parameters (for svmlight)
+ const char* /*pszOption*/ // other classifier parameters (for svmlight)
) {
fnGenerateInstanceFile(pszSynFname, pszAlignFname, pszSourceFname,
pszTargetFname, pszInstanceFname);
@@ -134,14 +134,14 @@ delete pZhangleMaxent;*/
}
inline void fnGetOutcome(int iL1, int iR1, int iL2, int iR2,
- const SAlignment* pAlign, string& strOutcome) {
+ const SAlignment* /*pAlign*/, string& strOutcome) {
if (iL1 == -1 && iL2 == -1)
strOutcome = "BU"; // 1. both are untranslated
else if (iL1 == -1)
strOutcome = "1U"; // 2. XP1 is untranslated
else if (iL2 == -1)
strOutcome = "2U"; // 3. XP2 is untranslated
- else if (iL1 == iL2 && iR2 == iR2)
+ else if (iL1 == iL2 && iR1 == iR2)
strOutcome = "SS"; // 4. Have same scope
else if (iL1 <= iL2 && iR1 >= iR2)
strOutcome = "1C2"; // 5. XP1's translation covers XP2's
@@ -240,7 +240,7 @@ delete pZhangleMaxent;*/
int iPos, const vector<string>& vecChunkStatus,
const vector<int>& vecPosition,
const vector<string>& vecSTerms,
- const vector<string>& vecTTerms, string& strOutcome,
+ const vector<string>& /*vecTTerms*/, string& strOutcome,
ostringstream& ostr) {
STreeItem* pCon1, *pCon2;
pCon1 = pParent->m_vecChildren[iPos - 1];
@@ -313,11 +313,11 @@ delete pZhangleMaxent;*/
* f8: the first and the last word of XP2's translation (f8_f, f8_l)
* f9: the translation of XP1's and XP2's head word (f9_1, f9_2)
*/
- void fnGenerateInstance(const SParsedTree* pTree, const STreeItem* pParent,
+ void fnGenerateInstance(const SParsedTree* /*pTree*/, const STreeItem* pParent,
const STreeItem* pCon1, const STreeItem* pCon2,
const SAlignment* pAlign,
const vector<string>& vecSTerms,
- const vector<string>& vecTTerms, string& strOutcome,
+ const vector<string>& /*vecTTerms*/, string& strOutcome,
ostringstream& ostr) {
int iLeft1, iRight1, iLeft2, iRight2;
diff --git a/utils/lbfgs.h b/utils/lbfgs.h
index ed5cd944..4d706f7a 100644
--- a/utils/lbfgs.h
+++ b/utils/lbfgs.h
@@ -1,6 +1,8 @@
#ifndef _LBFGS_H_
#define _LBFGS_H_
+#include <vector>
+
// template<class FuncGrad>
// std::vector<double>
// perform_LBFGS(FuncGrad func_grad, const std::vector<double> & x0);
@@ -13,7 +15,6 @@ std::vector<double> perform_OWLQN(
double (*func_grad)(const std::vector<double> &, std::vector<double> &),
const std::vector<double> &x0, const double C);
-// const int LBFGS_M = 7;
const int LBFGS_M = 10;
#endif
diff --git a/utils/tsuruoka_maxent.h b/utils/tsuruoka_maxent.h
index d1b062fe..550a4b7f 100644
--- a/utils/tsuruoka_maxent.h
+++ b/utils/tsuruoka_maxent.h
@@ -34,7 +34,7 @@ struct Tsuruoka_Maxent {
}
void fnTrain(const char* pszInstanceFName, const char* pszAlgorithm,
- const char* pszModelFName, int iNumIteration) {
+ const char* pszModelFName, int /*iNumIteration*/) {
assert(strcmp(pszAlgorithm, "l1") == 0 || strcmp(pszAlgorithm, "l2") == 0 ||
strcmp(pszAlgorithm, "sgd") == 0 ||
strcmp(pszAlgorithm, "SGD") == 0);