#include <FeatureData.h>
Public Member Functions | |
FeatureData () | |
~FeatureData () | |
void | clear () |
FeatureArray & | get (size_t idx) |
const FeatureArray & | get (size_t idx) const |
bool | exists (int sent_idx) const |
bool | existsInternal (int sent_idx) const |
FeatureStats & | get (std::size_t i, std::size_t j) |
const FeatureStats & | get (std::size_t i, std::size_t j) const |
void | add (FeatureArray &e) |
void | add (FeatureStats &e, int sent_idx) |
std::size_t | size () const |
std::size_t | NumberOfFeatures () const |
void | NumberOfFeatures (std::size_t v) |
std::string | Features () const |
void | Features (const std::string &f) |
void | save (const std::string &file, bool bin=false) |
void | save (std::ostream *os, bool bin=false) |
void | save (bool bin=false) |
void | load (std::istream *is, const SparseVector &sparseWeights) |
void | load (const std::string &file, const SparseVector &sparseWeights) |
bool | check_consistency () const |
void | setIndex () |
int | getIndex (int idx) const |
int | getName (std::size_t idx) const |
bool | existsFeatureNames () const |
std::string | getFeatureName (std::size_t idx) const |
std::size_t | getFeatureIndex (const std::string &name) const |
void | setFeatureMap (const std::string &feat) |
std::string | ToString () const |
Definition at line 22 of file FeatureData.h.
MosesTuning::FeatureData::FeatureData | ( | ) |
Definition at line 22 of file FeatureData.cpp.
MosesTuning::FeatureData::~FeatureData | ( | ) | [inline] |
Definition at line 35 of file FeatureData.h.
void MosesTuning::FeatureData::add | ( | FeatureStats & | e, | |
int | sent_idx | |||
) |
Definition at line 94 of file FeatureData.cpp.
References add(), MosesTuning::FeatureArray::add(), exists(), MosesTuning::FeatureArray::Features(), getIndex(), MosesTuning::FeatureArray::NumberOfFeatures(), and MosesTuning::FeatureArray::setIndex().
void MosesTuning::FeatureData::add | ( | FeatureArray & | e | ) |
Definition at line 82 of file FeatureData.cpp.
References exists(), getIndex(), MosesTuning::FeatureArray::getIndex(), and setIndex().
Referenced by add().
bool MosesTuning::FeatureData::check_consistency | ( | ) | const |
Definition at line 112 of file FeatureData.cpp.
void MosesTuning::FeatureData::clear | ( | ) | [inline] |
Definition at line 37 of file FeatureData.h.
bool MosesTuning::FeatureData::exists | ( | int | sent_idx | ) | const [inline] |
Definition at line 48 of file FeatureData.h.
References existsInternal(), and getIndex().
Referenced by add().
bool MosesTuning::FeatureData::existsFeatureNames | ( | ) | const [inline] |
Definition at line 111 of file FeatureData.h.
bool MosesTuning::FeatureData::existsInternal | ( | int | sent_idx | ) | const [inline] |
Definition at line 52 of file FeatureData.h.
Referenced by exists().
void MosesTuning::FeatureData::Features | ( | const std::string & | f | ) | [inline] |
Definition at line 81 of file FeatureData.h.
std::string MosesTuning::FeatureData::Features | ( | ) | const [inline] |
Definition at line 78 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
const FeatureStats& MosesTuning::FeatureData::get | ( | std::size_t | i, | |
std::size_t | j | |||
) | const [inline] |
Definition at line 60 of file FeatureData.h.
FeatureStats& MosesTuning::FeatureData::get | ( | std::size_t | i, | |
std::size_t | j | |||
) | [inline] |
Definition at line 56 of file FeatureData.h.
const FeatureArray& MosesTuning::FeatureData::get | ( | size_t | idx | ) | const [inline] |
Definition at line 44 of file FeatureData.h.
FeatureArray& MosesTuning::FeatureData::get | ( | size_t | idx | ) | [inline] |
Definition at line 41 of file FeatureData.h.
std::size_t MosesTuning::FeatureData::getFeatureIndex | ( | const std::string & | name | ) | const [inline] |
Definition at line 126 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
std::string MosesTuning::FeatureData::getFeatureName | ( | std::size_t | idx | ) | const [inline] |
Definition at line 115 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
int MosesTuning::FeatureData::getIndex | ( | int | idx | ) | const [inline] |
Definition at line 96 of file FeatureData.h.
Referenced by add(), and exists().
int MosesTuning::FeatureData::getName | ( | std::size_t | idx | ) | const [inline] |
Definition at line 104 of file FeatureData.h.
void MosesTuning::FeatureData::load | ( | const std::string & | file, | |
const SparseVector & | sparseWeights | |||
) |
void MosesTuning::FeatureData::load | ( | std::istream * | is, | |
const SparseVector & | sparseWeights | |||
) |
void MosesTuning::FeatureData::NumberOfFeatures | ( | std::size_t | v | ) | [inline] |
Definition at line 74 of file FeatureData.h.
std::size_t MosesTuning::FeatureData::NumberOfFeatures | ( | ) | const [inline] |
Definition at line 71 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
void MosesTuning::FeatureData::save | ( | bool | bin = false |
) |
Definition at line 41 of file FeatureData.cpp.
References save().
void MosesTuning::FeatureData::save | ( | std::ostream * | os, | |
bool | bin = false | |||
) |
void MosesTuning::FeatureData::save | ( | const std::string & | file, | |
bool | bin = false | |||
) |
void MosesTuning::FeatureData::setFeatureMap | ( | const std::string & | feat | ) |
void MosesTuning::FeatureData::setIndex | ( | ) |
Definition at line 123 of file FeatureData.cpp.
Referenced by add().
std::size_t MosesTuning::FeatureData::size | ( | ) | const [inline] |
Definition at line 67 of file FeatureData.h.
string MosesTuning::FeatureData::ToString | ( | ) | const |
Definition at line 149 of file FeatureData.cpp.