oxicuda_seq/ctc/mod.rs
1//! Connectionist Temporal Classification (CTC).
2//!
3//! CTC (Graves et al. 2006) enables training and decoding of sequence models
4//! whose output length differs from, and is not pre-aligned with, the target
5//! label sequence. This module provides:
6//!
7//! * [`mod@ctc_loss`] — the forward-backward CTC negative-log-likelihood loss over a
8//! blank-augmented label lattice, computed in log-space.
9//! * [`ctc_log_occupancy`] — per-symbol posterior responsibilities (the basis of
10//! the CTC gradient).
11//! * [`ctc_greedy_decode`] — best-path (arg-max) decoding with CTC collapse.
12//! * [`ctc_prefix_beam_search`] — prefix-beam-search decoding that sums
13//! alignment multiplicities (Hannun et al. 2014).
14
15pub mod ctc_decode;
16pub mod ctc_loss;
17
18pub use ctc_decode::{CtcHypothesis, ctc_greedy_decode, ctc_prefix_beam_search};
19pub use ctc_loss::{ctc_log_occupancy, ctc_loss, ctc_loss_batch};