The Infinigram interface can be abstracted away from the CDAWG as a specific implementation.
Operations at inference time should be moved to a different object/trait that wraps a Cdawg:
Get maximum suffix length
Get associated count
Get entropy
Get n-gram model predictions and loss
Most of these operations would take a CdawgState as input (and potentially the next token)
The
Infinigram
interface can be abstracted away from the CDAWG as a specific implementation. Operations at inference time should be moved to a different object/trait that wraps aCdawg
:Most of these operations would take a
CdawgState
as input (and potentially the next token)