#include <ScoreData.h>
Public Member Functions | |
ScoreData (Scorer *scorer) | |
~ScoreData () | |
void | clear () |
ScoreArray | get (const std::string &idx) |
ScoreArray & | get (std::size_t idx) |
const ScoreArray & | get (std::size_t idx) const |
bool | exists (const std::string &sent_idx) const |
bool | exists (int sent_idx) const |
ScoreStats & | get (std::size_t i, std::size_t j) |
const ScoreStats & | get (std::size_t i, std::size_t j) const |
std::string | name () const |
std::string | name (const std::string &score_type) |
void | add (ScoreArray &e) |
void | add (const ScoreStats &e, const std::string &sent_idx) |
std::size_t | NumberOfScores () const |
std::size_t | size () const |
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 |
Definition at line 21 of file ScoreData.h.
ScoreData::ScoreData | ( | Scorer * | scorer | ) |
Definition at line 19 of file ScoreData.cpp.
References Scorer::getName(), Scorer::NumberOfScores(), and Scorer::setScoreData().
ScoreData::~ScoreData | ( | ) | [inline] |
Definition at line 37 of file ScoreData.h.
void ScoreData::add | ( | const ScoreStats & | e, | |
const std::string & | sent_idx | |||
) |
void ScoreData::add | ( | ScoreArray & | e | ) |
Definition at line 82 of file ScoreData.cpp.
References exists(), getIndex(), ScoreArray::getIndex(), and setIndex().
Referenced by InterpolatedScorer::setScoreData().
bool ScoreData::check_consistency | ( | ) | const |
Definition at line 116 of file ScoreData.cpp.
void ScoreData::clear | ( | ) | [inline] |
Definition at line 39 of file ScoreData.h.
bool ScoreData::exists | ( | int | sent_idx | ) | const [inline] |
Definition at line 57 of file ScoreData.h.
bool ScoreData::exists | ( | const std::string & | sent_idx | ) | const [inline] |
Definition at line 53 of file ScoreData.h.
References getIndex().
Referenced by add().
const ScoreStats& ScoreData::get | ( | std::size_t | i, | |
std::size_t | j | |||
) | const [inline] |
Definition at line 65 of file ScoreData.h.
ScoreStats& ScoreData::get | ( | std::size_t | i, | |
std::size_t | j | |||
) | [inline] |
Definition at line 61 of file ScoreData.h.
const ScoreArray& ScoreData::get | ( | std::size_t | idx | ) | const [inline] |
Definition at line 49 of file ScoreData.h.
ScoreArray& ScoreData::get | ( | std::size_t | idx | ) | [inline] |
Definition at line 45 of file ScoreData.h.
ScoreArray ScoreData::get | ( | const std::string & | idx | ) | [inline] |
Definition at line 41 of file ScoreData.h.
References getIndex().
Referenced by main(), StatisticsBasedScorer::score(), SentenceLevelScorer::score(), and InterpolatedScorer::setScoreData().
std::string ScoreData::getIndex | ( | std::size_t | idx | ) | const [inline] |
Definition at line 100 of file ScoreData.h.
int ScoreData::getIndex | ( | const std::string & | idx | ) | const [inline] |
Definition at line 92 of file ScoreData.h.
Referenced by add(), exists(), and get().
void ScoreData::load | ( | const std::string & | file | ) |
void ScoreData::load | ( | std::istream * | is | ) |
std::string ScoreData::name | ( | const std::string & | score_type | ) | [inline] |
Definition at line 71 of file ScoreData.h.
std::string ScoreData::name | ( | ) | const [inline] |
Definition at line 69 of file ScoreData.h.
std::size_t ScoreData::NumberOfScores | ( | ) | const [inline] |
Definition at line 78 of file ScoreData.h.
Referenced by InterpolatedScorer::setScoreData().
void ScoreData::save | ( | bool | bin = false |
) |
Definition at line 49 of file ScoreData.cpp.
References save().
void ScoreData::save | ( | std::ostream * | os, | |
bool | bin = false | |||
) |
void ScoreData::save | ( | const std::string & | file, | |
bool | bin = false | |||
) |
void ScoreData::setIndex | ( | ) |
Definition at line 127 of file ScoreData.cpp.
Referenced by add().
std::size_t ScoreData::size | ( | ) | const [inline] |
Definition at line 79 of file ScoreData.h.
Referenced by Scorer::getReferenceSize(), main(), StatisticsBasedScorer::score(), SentenceLevelScorer::score(), and InterpolatedScorer::setScoreData().