diff options
author | Wu, Ke <wuke@cs.umd.edu> | 2014-10-10 17:56:53 -0400 |
---|---|---|
committer | Wu, Ke <wuke@cs.umd.edu> | 2014-10-10 17:56:53 -0400 |
commit | 73abcb3a73ef5f24f29a3c3f9fda50bc431e9175 (patch) | |
tree | f91c1fdae59fb15d5d8bb0e10fec984b188683ed /utils | |
parent | 435ebca6bd25819d263cc522f76e284d803c2110 (diff) |
Eliminate compiler warnings
Diffstat (limited to 'utils')
-rw-r--r-- | utils/argument_reorder_model.cc | 2 | ||||
-rw-r--r-- | utils/constituent_reorder_model.cc | 12 | ||||
-rw-r--r-- | utils/lbfgs.h | 3 | ||||
-rw-r--r-- | utils/tsuruoka_maxent.h | 2 |
4 files changed, 10 insertions, 9 deletions
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); |