/disk4/html/www/moses/doxygen/mosesdecoder/misc/addLexROtoPT.cpp File Reference

#include <iostream>
#include <string>
#include "moses/Phrase.h"
#include "moses/FactorCollection.h"
#include "moses/Timer.h"
#include "moses/InputFileStream.h"
#include "moses/TranslationModel/CompactPT/BlockHashIndex.h"
#include "moses/TranslationModel/CompactPT/CanonicalHuffman.h"
#include "moses/TranslationModel/CompactPT/StringVector.h"

Go to the source code of this file.

Typedefs

typedef CanonicalHuffman< float > ScoreTree

Functions

void Load (const string &filePath)
std::string MakeKey (const std::string &f, const std::string &e, const std::string &c)
std::vector< float > GetScore (const std::string &f, const std::string &e, const std::string &c)
int main (int argc, char **argv)

Variables

Timer timer
FactorList m_factorsF
FactorList m_factorsE
FactorList m_factorsC
BlockHashIndex m_hash (10, 16)
size_t m_numScoreComponent
bool m_multipleScoreTrees
bool m_inMemory = false
std::vector< ScoreTree * > m_scoreTrees
StringVector< unsigned char,
unsigned long, MmapAllocator
m_scoresMapped
StringVector< unsigned char,
unsigned long, std::allocator > 
m_scoresMemory


Typedef Documentation

typedef CanonicalHuffman<float> ScoreTree

Definition at line 24 of file addLexROtoPT.cpp.


Function Documentation

std::vector<float> GetScore ( const std::string &  f,
const std::string &  e,
const std::string &  c 
)

Definition at line 86 of file addLexROtoPT.cpp.

References Moses::BlockHashIndex::GetSize(), index, key, m_hash, m_inMemory, m_multipleScoreTrees, m_numScoreComponent, m_scoreTrees, MakeKey(), and prob().

Referenced by Moses::getLatticeMBRNBest(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void Load ( const string &  filePath  ) 

Definition at line 31 of file addLexROtoPT.cpp.

References Moses::StringVector< ValueT, PosT, Allocator >::load(), Moses::BlockHashIndex::Load(), m_hash, m_inMemory, m_multipleScoreTrees, m_numScoreComponent, m_scoreTrees, NULL, read(), and UTIL_THROW_IF2.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 119 of file addLexROtoPT.cpp.

References GetScore(), Load(), m_factorsE, m_factorsF, Moses::SPrint(), Moses::TokenizeMultiCharSeparator(), and Trim().

Here is the call graph for this function:

std::string MakeKey ( const std::string &  f,
const std::string &  e,
const std::string &  c 
)

Definition at line 65 of file addLexROtoPT.cpp.

References key, m_factorsC, and m_factorsE.

Referenced by GetScore().

Here is the caller graph for this function:


Variable Documentation

FactorList m_factorsC

Definition at line 17 of file addLexROtoPT.cpp.

Referenced by MakeKey().

FactorList m_factorsE

Definition at line 17 of file addLexROtoPT.cpp.

Referenced by main(), and MakeKey().

FactorList m_factorsF

Definition at line 17 of file addLexROtoPT.cpp.

Referenced by main().

Referenced by GetScore(), and Load().

bool m_inMemory = false

Definition at line 22 of file addLexROtoPT.cpp.

Referenced by GetScore(), and Load().

Definition at line 21 of file addLexROtoPT.cpp.

Referenced by GetScore(), and Load().

Definition at line 20 of file addLexROtoPT.cpp.

Referenced by GetScore(), and Load().

StringVector<unsigned char, unsigned long, MmapAllocator> m_scoresMapped

Definition at line 27 of file addLexROtoPT.cpp.

StringVector<unsigned char, unsigned long, std::allocator> m_scoresMemory

Definition at line 28 of file addLexROtoPT.cpp.

std::vector<ScoreTree*> m_scoreTrees

Definition at line 25 of file addLexROtoPT.cpp.

Referenced by GetScore(), and Load().

Definition at line 15 of file addLexROtoPT.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and sapt::DocumentBias::DocumentBias().


Generated on Thu Jul 6 00:31:27 2017 for Moses by  doxygen 1.5.9