Skip to content

Commit

Permalink
Fix the documentation of k2.DenseFsaVec. (k2-fsa#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Aug 12, 2021
1 parent c7d6615 commit e7fc8f4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions k2/python/k2/dense_fsa_vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,18 @@ def __init__(self,
- `duration > 0`
Caution:
The last column, i.e., the duration column, has to be sorted
in **decreasing** order. That is, the first supervision_segment
(the first row) has the largest duration.
If the resulting dense fsa vec is used as an input to
`k2.intersect_dense`, then the last column, i.e., the duration
column, has to be sorted in **decreasing** order.
That is, the first supervision_segment (the first row) has the
largest duration.
Otherwise, you don't need to sort the last column.
`k2.intersect_dense` is often used in the training stage, so
you should usually sort dense fsa vecs by its duration
in training. `k2.intersect_dense_pruned` is usually used in the
decoding stage, so you don't need to sort dense fsa vecs in
decoding.
allow_truncate:
If not zero, it truncates at most this number of frames from
duration in case start_frame + duration > T.
Expand Down

0 comments on commit e7fc8f4

Please sign in to comment.