#include <ScoreFeature.h>
Public Member Functions | |
ScoreFeatureManager () | |
const std::string & | usage () const |
void | configure (const std::vector< std::string > args) |
void | addPropertiesToPhrasePair (ExtractionPhrasePair &phrasePair, float count, int sentenceId) const |
void | addFeatures (const ScoreFeatureContext &context, std::vector< float > &denseValues, std::map< std::string, float > &sparseValues) const |
const std::vector < ScoreFeaturePtr > & | getFeatures () const |
bool | includeSentenceId () const |
Definition at line 103 of file ScoreFeature.h.
MosesTraining::ScoreFeatureManager::ScoreFeatureManager | ( | ) | [inline] |
Definition at line 106 of file ScoreFeature.h.
void MosesTraining::ScoreFeatureManager::addFeatures | ( | const ScoreFeatureContext & | context, | |
std::vector< float > & | denseValues, | |||
std::map< std::string, float > & | sparseValues | |||
) | const |
Add all the features
Definition at line 105 of file ScoreFeature.cpp.
Referenced by outputPhrasePair().
void MosesTraining::ScoreFeatureManager::addPropertiesToPhrasePair | ( | ExtractionPhrasePair & | phrasePair, | |
float | count, | |||
int | sentenceId | |||
) | const |
Some features might need to store properties in ExtractionPhrasePair, e.g. to pass along external information loaded by a feature which may distinguish several phrase occurrences based on sentence ID
Definition at line 96 of file ScoreFeature.cpp.
Referenced by main().
void MosesTraining::ScoreFeatureManager::configure | ( | const std::vector< std::string > | args | ) |
Pass the unused command-line arguments to configure the extra features
Definition at line 38 of file ScoreFeature.cpp.
References starts_with(), UTIL_THROW, and UTIL_THROW_IF.
Referenced by BOOST_AUTO_TEST_CASE(), and main().
const std::vector<ScoreFeaturePtr>& MosesTraining::ScoreFeatureManager::getFeatures | ( | ) | const [inline] |
Definition at line 127 of file ScoreFeature.h.
bool MosesTraining::ScoreFeatureManager::includeSentenceId | ( | ) | const [inline] |
Do we need to include sentence ids in phrase pairs?
Definition at line 132 of file ScoreFeature.h.
Referenced by main().
const string & MosesTraining::ScoreFeatureManager::usage | ( | ) | const |
To be appended to the score usage message
Definition at line 32 of file ScoreFeature.cpp.
Referenced by main().