mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
Got rid of warnings
This commit is contained in:
parent
023bd0c813
commit
20487f9d7f
@ -15,15 +15,15 @@ void printHelp(char **argv)
|
|||||||
"options: \n"
|
"options: \n"
|
||||||
"\t-in string -- input table file name\n"
|
"\t-in string -- input table file name\n"
|
||||||
"\t-out string -- prefix of binary table file\n"
|
"\t-out string -- prefix of binary table file\n"
|
||||||
|
#ifdef WITH_THREADS
|
||||||
|
"\t-threads int -- number of threads used for conversion\n"
|
||||||
|
#endif
|
||||||
"\nadvanced:\n"
|
"\nadvanced:\n"
|
||||||
"\t-landmark int -- use landmark phrase every 2^n phrases\n"
|
"\t-landmark int -- use landmark phrase every 2^n phrases\n"
|
||||||
"\t-fingerprint int -- number of bits used for phrase fingerprints\n"
|
"\t-fingerprint int -- number of bits used for phrase fingerprints\n"
|
||||||
"\t-join-scores -- single set of Huffman codes for score components\n"
|
"\t-join-scores -- single set of Huffman codes for score components\n"
|
||||||
"\t-quantize int -- maximum number of scores per score component\n"
|
"\t-quantize int -- maximum number of scores per score component\n"
|
||||||
#ifdef WITH_THREADS
|
"\n"
|
||||||
"\t-threads int -- number of threads used for conversion\n"
|
|
||||||
#endif
|
|
||||||
"\n\n"
|
|
||||||
|
|
||||||
" For more information see: http://www.statmt.org/moses/...\n"
|
" For more information see: http://www.statmt.org/moses/...\n"
|
||||||
" and\n\n"
|
" and\n\n"
|
||||||
|
@ -10,20 +10,19 @@ void printHelp(char **argv) {
|
|||||||
"options: \n"
|
"options: \n"
|
||||||
"\t-in string -- input table file name\n"
|
"\t-in string -- input table file name\n"
|
||||||
"\t-out string -- prefix of binary table file\n"
|
"\t-out string -- prefix of binary table file\n"
|
||||||
"\t-encoding string -- Encoding type (PREnc REnc None)\n"
|
|
||||||
"\t-maxrank int -- Maximum rank for PREnc\n"
|
|
||||||
"\t-nscores int -- number of score components in phrase table\n"
|
"\t-nscores int -- number of score components in phrase table\n"
|
||||||
"\t-alignment-info -- include alignment info in the binary phrase table\n"
|
"\t-alignment-info -- include alignment info in the binary phrase table\n"
|
||||||
|
#ifdef WITH_THREADS
|
||||||
|
"\t-threads int -- number of threads used for conversion\n"
|
||||||
|
#endif
|
||||||
"\nadvanced:\n"
|
"\nadvanced:\n"
|
||||||
|
"\t-encoding string -- Encoding type (PREnc REnc None)\n"
|
||||||
|
"\t-maxrank int -- Maximum rank for PREnc\n"
|
||||||
"\t-landmark int -- use landmark phrase every 2^n source phrases\n"
|
"\t-landmark int -- use landmark phrase every 2^n source phrases\n"
|
||||||
"\t-fingerprint int -- number of bits used for source phrase fingerprints\n"
|
"\t-fingerprint int -- number of bits used for source phrase fingerprints\n"
|
||||||
"\t-join-scores -- single set of Huffman codes for score components\n"
|
"\t-join-scores -- single set of Huffman codes for score components\n"
|
||||||
"\t-quantize int -- maximum number of scores per score component\n"
|
"\t-quantize int -- maximum number of scores per score component\n"
|
||||||
|
"\n"
|
||||||
#ifdef WITH_THREADS
|
|
||||||
"\t-threads int -- number of threads used for conversion\n"
|
|
||||||
#endif
|
|
||||||
"\n\n"
|
|
||||||
|
|
||||||
" For more information see: http://www.statmt.org/moses/...\n"
|
" For more information see: http://www.statmt.org/moses/...\n"
|
||||||
" and\n\n"
|
" and\n\n"
|
||||||
|
@ -271,7 +271,7 @@ class BitStream
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
BitStream(Container &data)
|
BitStream(Container &data)
|
||||||
: m_data(data), m_iterator(m_data.begin()),
|
: m_data(data), m_iterator(m_data.begin()), m_currentValue(0),
|
||||||
m_valueBits(sizeof(typename Container::value_type) * 8),
|
m_valueBits(sizeof(typename Container::value_type) * 8),
|
||||||
m_mask(1), m_bitPos(0) { }
|
m_mask(1), m_bitPos(0) { }
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
local with-cmph = [ option.get "with-cmph" ] ;
|
local with-cmph = [ option.get "with-cmph" ] ;
|
||||||
lib CompactPT : [ glob *.cpp ] ..//moses_internal $(with-cmph)/src/libcmph.a
|
lib cmph : : <search>$(with-cmph)/lib ;
|
||||||
: <include>$(with-cmph)/src/
|
lib CompactPT : [ glob *.cpp ] ..//moses_internal cmph
|
||||||
|
: <include>$(with-cmph)/include
|
||||||
;
|
;
|
||||||
|
@ -31,8 +31,8 @@ LexicalReorderingTableCreator::LexicalReorderingTableCreator(
|
|||||||
, size_t threads
|
, size_t threads
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
: m_inPath(inPath), m_outPath(outPath), m_numScoreComponent(numScoreComponent),
|
: m_inPath(inPath), m_outPath(outPath), m_orderBits(orderBits),
|
||||||
m_orderBits(orderBits), m_fingerPrintBits(fingerPrintBits),
|
m_fingerPrintBits(fingerPrintBits), m_numScoreComponent(numScoreComponent),
|
||||||
m_multipleScoreTrees(multipleScoreTrees), m_quantize(quantize),
|
m_multipleScoreTrees(multipleScoreTrees), m_quantize(quantize),
|
||||||
m_separator(" ||| "), m_hash(m_orderBits, m_fingerPrintBits),
|
m_separator(" ||| "), m_hash(m_orderBits, m_fingerPrintBits),
|
||||||
m_lastFlushedLine(-1)
|
m_lastFlushedLine(-1)
|
||||||
|
@ -45,10 +45,6 @@ class LexicalReorderingTableCreator {
|
|||||||
|
|
||||||
BlockHashIndex m_hash;
|
BlockHashIndex m_hash;
|
||||||
|
|
||||||
#ifdef WITH_THREADS
|
|
||||||
size_t m_threads;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef Counter<float> ScoreCounter;
|
typedef Counter<float> ScoreCounter;
|
||||||
typedef CanonicalHuffman<float> ScoreTree;
|
typedef CanonicalHuffman<float> ScoreTree;
|
||||||
|
|
||||||
@ -64,6 +60,10 @@ class LexicalReorderingTableCreator {
|
|||||||
std::string m_lastFlushedSourcePhrase;
|
std::string m_lastFlushedSourcePhrase;
|
||||||
std::vector<std::string> m_lastRange;
|
std::vector<std::string> m_lastRange;
|
||||||
|
|
||||||
|
#ifdef WITH_THREADS
|
||||||
|
size_t m_threads;
|
||||||
|
#endif
|
||||||
|
|
||||||
void PrintInfo();
|
void PrintInfo();
|
||||||
|
|
||||||
void EncodeScores();
|
void EncodeScores();
|
||||||
|
@ -26,6 +26,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||||||
namespace Moses
|
namespace Moses
|
||||||
{
|
{
|
||||||
|
|
||||||
|
bool operator<(const PackedItem &pi1, const PackedItem &pi2)
|
||||||
|
{
|
||||||
|
if(pi1.GetLine() < pi2.GetLine())
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::string PhraseTableCreator::m_phraseStopSymbol = "__SPECIAL_STOP_SYMBOL__";
|
std::string PhraseTableCreator::m_phraseStopSymbol = "__SPECIAL_STOP_SYMBOL__";
|
||||||
std::string PhraseTableCreator::m_separator = " ||| ";
|
std::string PhraseTableCreator::m_separator = " ||| ";
|
||||||
|
|
||||||
|
@ -186,11 +186,7 @@ class PackedItem
|
|||||||
float GetScore() const;
|
float GetScore() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool operator<(const PackedItem &pi1, const PackedItem &pi2) {
|
bool operator<(const PackedItem &pi1, const PackedItem &pi2);
|
||||||
if(pi1.GetLine() < pi2.GetLine())
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
class PhraseTableCreator
|
class PhraseTableCreator
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user