#include <FeatureData.h>
Public Member Functions | |
FeatureData () | |
~FeatureData () | |
void | clear () |
bool | hasSparseFeatures () const |
FeatureArray | get (const std::string &idx) |
FeatureArray & | get (std::size_t idx) |
const FeatureArray & | get (std::size_t idx) const |
bool | exists (const std::string &sent_idx) const |
bool | exists (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, const std::string &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) |
void | load (const std::string &file) |
bool | check_consistency () const |
void | setIndex () |
int | getIndex (const std::string &idx) const |
std::string | getIndex (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 17 of file FeatureData.h.
FeatureData::FeatureData | ( | ) |
Definition at line 20 of file FeatureData.cpp.
FeatureData::~FeatureData | ( | ) | [inline] |
Definition at line 31 of file FeatureData.h.
void FeatureData::add | ( | FeatureStats & | e, | |
const std::string & | sent_idx | |||
) |
void FeatureData::add | ( | FeatureArray & | e | ) |
Definition at line 83 of file FeatureData.cpp.
References exists(), getIndex(), FeatureArray::getIndex(), and setIndex().
bool FeatureData::check_consistency | ( | ) | const |
Definition at line 113 of file FeatureData.cpp.
void FeatureData::clear | ( | ) | [inline] |
Definition at line 33 of file FeatureData.h.
bool FeatureData::exists | ( | int | sent_idx | ) | const [inline] |
Definition at line 48 of file FeatureData.h.
bool FeatureData::exists | ( | const std::string & | sent_idx | ) | const [inline] |
Definition at line 44 of file FeatureData.h.
References getIndex().
Referenced by add().
bool FeatureData::existsFeatureNames | ( | ) | const [inline] |
Definition at line 97 of file FeatureData.h.
void FeatureData::Features | ( | const std::string & | f | ) | [inline] |
Definition at line 69 of file FeatureData.h.
std::string FeatureData::Features | ( | ) | const [inline] |
Definition at line 68 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
const FeatureStats& FeatureData::get | ( | std::size_t | i, | |
std::size_t | j | |||
) | const [inline] |
Definition at line 56 of file FeatureData.h.
FeatureStats& FeatureData::get | ( | std::size_t | i, | |
std::size_t | j | |||
) | [inline] |
Definition at line 52 of file FeatureData.h.
const FeatureArray& FeatureData::get | ( | std::size_t | idx | ) | const [inline] |
Definition at line 42 of file FeatureData.h.
FeatureArray& FeatureData::get | ( | std::size_t | idx | ) | [inline] |
Definition at line 41 of file FeatureData.h.
FeatureArray FeatureData::get | ( | const std::string & | idx | ) | [inline] |
Definition at line 37 of file FeatureData.h.
References getIndex().
std::size_t FeatureData::getFeatureIndex | ( | const std::string & | name | ) | const [inline] |
Definition at line 112 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
std::string FeatureData::getFeatureName | ( | std::size_t | idx | ) | const [inline] |
Definition at line 101 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
std::string FeatureData::getIndex | ( | std::size_t | idx | ) | const [inline] |
Definition at line 90 of file FeatureData.h.
int FeatureData::getIndex | ( | const std::string & | idx | ) | const [inline] |
Definition at line 82 of file FeatureData.h.
Referenced by add(), exists(), and get().
bool FeatureData::hasSparseFeatures | ( | ) | const [inline] |
Definition at line 35 of file FeatureData.h.
void FeatureData::load | ( | const std::string & | file | ) |
void FeatureData::load | ( | std::istream * | is | ) |
void FeatureData::NumberOfFeatures | ( | std::size_t | v | ) | [inline] |
Definition at line 66 of file FeatureData.h.
std::size_t FeatureData::NumberOfFeatures | ( | ) | const [inline] |
Definition at line 65 of file FeatureData.h.
Referenced by BOOST_AUTO_TEST_CASE().
void FeatureData::save | ( | bool | bin = false |
) |
Definition at line 40 of file FeatureData.cpp.
References save().
void FeatureData::save | ( | std::ostream * | os, | |
bool | bin = false | |||
) |
void FeatureData::save | ( | const std::string & | file, | |
bool | bin = false | |||
) |
void FeatureData::setFeatureMap | ( | const std::string & | feat | ) |
void FeatureData::setIndex | ( | ) |
Definition at line 124 of file FeatureData.cpp.
Referenced by add().
std::size_t FeatureData::size | ( | ) | const [inline] |
Definition at line 63 of file FeatureData.h.
string FeatureData::ToString | ( | ) | const |
Definition at line 150 of file FeatureData.cpp.