GenI-0.20.1: A natural language generator (specifically, an FB-LTAG surface realiser)Source codeContentsIndex
NLP.GenI.Statistics
Synopsis
data Statistics
type StatisticsState a = forall m. MonadState Statistics m => m a
emptyStats :: Statistics
showFinalStats :: Statistics -> String
initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> b
addMetric :: Metric -> StatisticsState ()
data Metric = IntMetric String Int
queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a]
updateMetrics :: (Metric -> Metric) -> Statistics -> Statistics
incrIntMetric :: String -> Int -> Metric -> Metric
queryIntMetric :: String -> Metric -> Maybe Int
Documentation
data Statistics Source
show/hide Instances
type StatisticsState a = forall m. MonadState Statistics m => m aSource
emptyStats :: StatisticsSource
showFinalStats :: Statistics -> StringSource
initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> bSource
addMetric :: Metric -> StatisticsState ()Source
Adds a metric at the beginning of the list (note we reverse the order whene we want to print the metrics)
data Metric Source
Constructors
IntMetric String Int
show/hide Instances
queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a]Source
updateMetrics :: (Metric -> Metric) -> Statistics -> StatisticsSource
incrIntMetric :: String -> Int -> Metric -> MetricSource
queryIntMetric :: String -> Metric -> Maybe IntSource
Produced by Haddock version 2.6.0