Home | History | Annotate | Download | only in fst

Lines Matching refs:SymbolTable

125   // does not exists, return SymbolTable::kNoSymbol.
132 // does not exists, return SymbolTable::kNoSymbol.
205 // \class SymbolTable
208 // The SymbolTable implements the mappings of labels to strings and reverse.
214 // SymbolTable for the words in the language model can share this symbol
217 class SymbolTable {
222 SymbolTable() : impl_(new SymbolTableImpl("<unspecified>")) {}
225 SymbolTable(const string& name) : impl_(new SymbolTableImpl(name)) {}
228 SymbolTable(const SymbolTable& table) : impl_(table.impl_) {
234 virtual ~SymbolTable() {
239 void operator=(const SymbolTable &st) {
248 // name to give the resulting SymbolTable.
249 static SymbolTable* ReadText(
256 return new SymbolTable(impl);
260 static SymbolTable* ReadText(const string& filename,
264 LOG(ERROR) << "SymbolTable::ReadText: Can't open file " << filename;
273 static SymbolTable* Read(istream &strm,
279 return new SymbolTable(impl);
283 static SymbolTable* Read(istream &strm, const string& source) {
290 static SymbolTable* Read(const string& filename) {
293 LOG(ERROR) << "SymbolTable::Read: Can't open file " << filename;
303 virtual SymbolTable* Copy() const {
304 return new SymbolTable(*this);
327 virtual void AddTable(const SymbolTable& table);
353 LOG(ERROR) << "SymbolTable::Write: Can't open file " << filename;
368 LOG(ERROR) << "SymbolTable::WriteText: Can't open file " << filename;
381 // does not exists, log error and return SymbolTable::kNoSymbol
387 // does not exists, log error and return SymbolTable::kNoSymbol
409 explicit SymbolTable(SymbolTableImpl* impl) : impl_(impl) {}
433 SymbolTableIterator(const SymbolTable& table)
469 const SymbolTable& table_;
477 inline bool CompatSymbols(const SymbolTable *syms1, const SymbolTable *syms2,
509 SymbolTable *RelabelSymbolTable(const SymbolTable *table,
511 SymbolTable *new_table = new SymbolTable(
522 inline void SymbolTableToString(const SymbolTable *table, string *result) {
528 inline SymbolTable *StringToSymbolTable(const string &s) {
530 return SymbolTable::Read(istrm, SymbolTableReadOptions());