#include <tree-renderer.h>
Public Member Functions | |
TreeRenderer (std::istream &is, bool binary, std::ostream &os, fst::SymbolTable &phone_syms, bool use_tooltips) | |
void | Render (const EventType *query) |
Static Public Attributes | |
static const int32 | kEdgeWidth = 1 |
static const int32 | kEdgeWidthQuery = 3 |
static const std::string | kEdgeColor = "black" |
static const std::string | kEdgeColorQuery = "red" |
Private Member Functions | |
void | RenderSubTree (const EventType *query, int32 id) |
void | RenderConstant (const EventType *query, int32 id) |
void | RenderSplit (const EventType *query, int32 id) |
void | RenderTable (const EventType *query, int32 id) |
std::string | MakeEdgeLabel (const EventKeyType &key, const ConstIntegerSet< EventValueType > &intset) |
void | RenderNonLeaf (int32 id, const EventKeyType &key, bool in_query) |
Private Attributes | |
fst::SymbolTable & | phone_syms_ |
std::istream & | is_ |
std::ostream & | out_ |
bool | binary_ |
int32 | N_ |
int32 | P_ |
bool | use_tooltips_ |
int32 | next_id_ |
Definition at line 31 of file tree-renderer.h.
|
inline |
Definition at line 38 of file tree-renderer.h.
References TreeRenderer::MakeEdgeLabel(), TreeRenderer::Render(), TreeRenderer::RenderConstant(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSplit(), TreeRenderer::RenderSubTree(), and TreeRenderer::RenderTable().
|
private |
Definition at line 61 of file tree-renderer.cc.
References ConstIntegerSet< I >::begin(), ConstIntegerSet< I >::end(), KALDI_ERR, kaldi::kPdfClass, and TreeRenderer::phone_syms_.
Referenced by TreeRenderer::RenderSplit(), and TreeRenderer::TreeRenderer().
void Render | ( | const EventType * | query = 0 | ) |
Definition at line 186 of file tree-renderer.cc.
References TreeRenderer::binary_, kaldi::ExpectToken(), TreeRenderer::is_, KALDI_ERR, TreeRenderer::N_, TreeRenderer::next_id_, TreeRenderer::out_, TreeRenderer::P_, kaldi::ReadBasicType(), and TreeRenderer::RenderSubTree().
Referenced by main(), and TreeRenderer::TreeRenderer().
Definition at line 158 of file tree-renderer.cc.
References TreeRenderer::binary_, kaldi::ExpectToken(), TreeRenderer::is_, TreeRenderer::kEdgeColor, TreeRenderer::kEdgeColorQuery, TreeRenderer::kEdgeWidth, TreeRenderer::kEdgeWidthQuery, TreeRenderer::out_, and kaldi::ReadBasicType().
Referenced by TreeRenderer::RenderSubTree(), and TreeRenderer::TreeRenderer().
|
private |
Definition at line 31 of file tree-renderer.cc.
References KALDI_ERR, TreeRenderer::kEdgeColor, TreeRenderer::kEdgeColorQuery, TreeRenderer::kEdgeWidth, TreeRenderer::kEdgeWidthQuery, kaldi::kPdfClass, TreeRenderer::N_, TreeRenderer::out_, and TreeRenderer::P_.
Referenced by TreeRenderer::RenderSplit(), TreeRenderer::RenderTable(), and TreeRenderer::TreeRenderer().
Definition at line 82 of file tree-renderer.cc.
References TreeRenderer::binary_, ConstIntegerSet< I >::count(), kaldi::ExpectToken(), TreeRenderer::is_, TreeRenderer::kEdgeColor, TreeRenderer::kEdgeColorQuery, TreeRenderer::kEdgeWidth, TreeRenderer::kEdgeWidthQuery, EventMap::Lookup(), TreeRenderer::MakeEdgeLabel(), TreeRenderer::next_id_, TreeRenderer::out_, ConstIntegerSet< I >::Read(), kaldi::ReadBasicType(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSubTree(), and TreeRenderer::use_tooltips_.
Referenced by TreeRenderer::RenderSubTree(), and TreeRenderer::TreeRenderer().
Definition at line 169 of file tree-renderer.cc.
References TreeRenderer::binary_, kaldi::CharToString(), kaldi::ExpectToken(), TreeRenderer::is_, KALDI_ERR, kaldi::Peek(), TreeRenderer::RenderConstant(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
Referenced by TreeRenderer::Render(), TreeRenderer::RenderSplit(), TreeRenderer::RenderTable(), and TreeRenderer::TreeRenderer().
Definition at line 117 of file tree-renderer.cc.
References TreeRenderer::binary_, kaldi::ExpectToken(), TreeRenderer::is_, KALDI_ERR, TreeRenderer::kEdgeColor, TreeRenderer::kEdgeColorQuery, TreeRenderer::kEdgeWidth, TreeRenderer::kEdgeWidthQuery, kaldi::kPdfClass, EventMap::Lookup(), TreeRenderer::N_, TreeRenderer::next_id_, TreeRenderer::out_, TreeRenderer::phone_syms_, kaldi::ReadBasicType(), TreeRenderer::RenderNonLeaf(), and TreeRenderer::RenderSubTree().
Referenced by TreeRenderer::RenderSubTree(), and TreeRenderer::TreeRenderer().
|
private |
Definition at line 75 of file tree-renderer.h.
Referenced by TreeRenderer::Render(), TreeRenderer::RenderConstant(), TreeRenderer::RenderSplit(), TreeRenderer::RenderSubTree(), and TreeRenderer::RenderTable().
|
private |
Definition at line 73 of file tree-renderer.h.
Referenced by TreeRenderer::Render(), TreeRenderer::RenderConstant(), TreeRenderer::RenderSplit(), TreeRenderer::RenderSubTree(), and TreeRenderer::RenderTable().
|
static |
Definition at line 35 of file tree-renderer.h.
Referenced by TreeRenderer::RenderConstant(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
|
static |
Definition at line 36 of file tree-renderer.h.
Referenced by TreeRenderer::RenderConstant(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
|
static |
Definition at line 33 of file tree-renderer.h.
Referenced by TreeRenderer::RenderConstant(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
|
static |
Definition at line 34 of file tree-renderer.h.
Referenced by TreeRenderer::RenderConstant(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
|
private |
Definition at line 76 of file tree-renderer.h.
Referenced by TreeRenderer::Render(), TreeRenderer::RenderNonLeaf(), and TreeRenderer::RenderTable().
|
private |
Definition at line 78 of file tree-renderer.h.
Referenced by TreeRenderer::Render(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
|
private |
Definition at line 74 of file tree-renderer.h.
Referenced by TreeRenderer::Render(), TreeRenderer::RenderConstant(), TreeRenderer::RenderNonLeaf(), TreeRenderer::RenderSplit(), and TreeRenderer::RenderTable().
|
private |
Definition at line 76 of file tree-renderer.h.
Referenced by TreeRenderer::Render(), and TreeRenderer::RenderNonLeaf().
|
private |
Definition at line 72 of file tree-renderer.h.
Referenced by TreeRenderer::MakeEdgeLabel(), and TreeRenderer::RenderTable().
|
private |
Definition at line 77 of file tree-renderer.h.
Referenced by TreeRenderer::RenderSplit().