|
|
__init__(self,
sphinx_file=None,
htk_file=None,
frate=100)
Construct a DAG, optionally loading contents from a file. |
source code
|
|
|
|
htk2dag(self,
htkfile)
Read an HTK-format lattice file to populate a DAG. |
source code
|
|
|
|
sphinx2dag(self,
s3file)
Read a Sphinx-III format lattice file to populate a DAG. |
source code
|
|
|
(Dag.Node, int, int, int)
|
edges(self,
node,
lm=None)
Return a generator for the set of edges exiting node. |
source code
|
|
|
int
|
|
|
int
|
|
|
generator(Dag.Node)
|
nodes(self)
Return a generator over all the nodes in the DAG, in time
order |
source code
|
|
|
generator(Dag.Node)
|
|
|
generator((int,object,Dag.Node))
|
|
|
Dag.Node
|
bestpath(self,
lm=None,
lw=7.5,
ip=0.7,
start=None,
end=None)
Find best path through lattice using Dijkstra's algorithm. |
source code
|
|
|
|
bypass_fillers(self)
Bypass filler nodes in the lattice. |
source code
|
|
|
(int, list(string, string))
|
minimum_error(self,
hyp,
start=None)
Find the minimum word error rate path through lattice, returning
the number of errors and an alignment. |
source code
|
|
|
list of Dag.Node
|
|
|
|
find_preds(self)
Find predecessor nodes for each node in the lattice and store them
in its 'prev' field. |
source code
|
|
|
|
traverse_depth(self,
start=None)
Depth-first traversal of DAG nodes |
source code
|
|
|
|
traverse_breadth(self,
start=None)
Breadth-first traversal of DAG nodes |
source code
|
|
|
|
reverse_breadth(self,
end=None)
Breadth-first reverse traversal of DAG nodes |
source code
|
|
|
|
remove_unreachable(self)
Remove unreachable nodes and dangling edges. |
source code
|
|
|
|
forward(self,
lm=None,
lw=7.5,
ip=0.7)
Compute forward variable for all arcs in the lattice. |
source code
|
|
|
|
backward(self,
lm=None,
lw=7.5,
ip=0.7)
Compute backward variable for all arcs in the lattice. |
source code
|
|
|
|
|
|
Inherited from list:
__add__,
__contains__,
__delitem__,
__delslice__,
__eq__,
__ge__,
__getattribute__,
__getitem__,
__getslice__,
__gt__,
__hash__,
__iadd__,
__imul__,
__iter__,
__le__,
__len__,
__lt__,
__mul__,
__ne__,
__new__,
__repr__,
__reversed__,
__rmul__,
__setitem__,
__setslice__,
append,
count,
extend,
index,
insert,
pop,
remove,
reverse,
sort
Inherited from object:
__delattr__,
__reduce__,
__reduce_ex__,
__setattr__,
__str__
|