This class is for when you are reading something in random access, but it may actually be stored per-speaker (or something similar) but the keys you're using are per utterance. More...
#include <kaldi-table.h>
Public Types | |
typedef Holder::T | T |
Public Member Functions | |
RandomAccessTableReaderMapped (const std::string &table_rxfilename, const std::string &utt2spk_rxfilename) | |
Note: "utt2spk_rxfilename" will in the normal case be an rxfilename for an utterance to speaker map, but this code is general; it accepts a generic map. More... | |
RandomAccessTableReaderMapped () | |
bool | Open (const std::string &table_rxfilename, const std::string &utt2spk_rxfilename) |
Note: when calling Open, utt2spk_rxfilename may be empty. More... | |
bool | HasKey (const std::string &key) |
const T & | Value (const std::string &key) |
bool | IsOpen () const |
bool | Close () |
Private Member Functions | |
RandomAccessTableReaderMapped & | operator= (const RandomAccessTableReaderMapped< Holder > &) |
Private Attributes | |
RandomAccessTableReader< Holder > | reader_ |
RandomAccessTableReader< TokenHolder > | token_reader_ |
std::string | utt2spk_rxfilename_ |
This class is for when you are reading something in random access, but it may actually be stored per-speaker (or something similar) but the keys you're using are per utterance.
So you also provide an "rxfilename" for a file containing lines like utt1 spk1 utt2 spk1 utt3 spk1 and so on. Note: this is optional; if it is an empty string, we just won't do the mapping. Also, "table_rxfilename" may be the empty string (as for a regular table), in which case the table just won't be opened. We provide only the most frequently used of the functions of RandomAccessTableReader.
Definition at line 432 of file kaldi-table.h.
typedef Holder::T T |
Definition at line 434 of file kaldi-table.h.
|
inline |
Definition at line 441 of file kaldi-table.h.
|
inline |
Definition at line 450 of file kaldi-table.h.
|
inline |
Definition at line 449 of file kaldi-table.h.
Referenced by main(), and kaldi::ProcessUtterance().
|
private |
|
private |
Definition at line 460 of file kaldi-table.h.
Referenced by RandomAccessTableReaderMapped< Holder >::HasKey(), RandomAccessTableReaderMapped< Holder >::Open(), and RandomAccessTableReaderMapped< Holder >::Value().
|
private |
Definition at line 461 of file kaldi-table.h.
Referenced by RandomAccessTableReaderMapped< Holder >::HasKey(), RandomAccessTableReaderMapped< Holder >::Open(), and RandomAccessTableReaderMapped< Holder >::Value().
|
private |
Definition at line 462 of file kaldi-table.h.
Referenced by RandomAccessTableReaderMapped< Holder >::HasKey(), and RandomAccessTableReaderMapped< Holder >::Value().