sequor-0.7.2: A sequence labeler based on Collins's sequence perceptron.

Safe HaskellNone

Helper.Atom

Documentation

class Monad m => MonadAtoms m whereSource

Methods

toAtom :: Txt -> m IntSource

maybeToAtom :: Txt -> m (Maybe Int)Source

fromAtom :: Int -> m TxtSource

table :: m AtomTableSource

Instances

data AtomTable Source

Constructors

T 

Fields

lastID :: !Int
 
to :: Map Txt Int
 
from :: IntMap Txt
 

data AtomsT m r Source

Instances

evalAtomsT :: Monad m => AtomsT m a -> m aSource