libGenI-0.16.1: A natural language generator (specifically, an FB-LTAG surface realiser)ContentsIndex
NLP.GenI.Statistics
Synopsis
data Statistics
type StatisticsState a = forall m. MonadState Statistics m => m a
type StatisticsStateIO a = forall m. (MonadState Statistics m, MonadIO m) => m a
emptyStats :: Statistics
printOutAllMetrics :: StatisticsStateIO ()
printOutAllMetrics' :: Statistics -> IO ()
printOutInspectionMetrics :: StatisticsStateIO ()
showFinalStats :: Statistics -> String
initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> b
addMetric :: Metric -> StatisticsState ()
addInspectionMetric :: Metric -> StatisticsState ()
setPrintOutInterval :: Int -> StatisticsState ()
mergeMetrics :: (Metric -> Metric -> Metric) -> Statistics -> Statistics -> Statistics
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
addIntMetrics :: Metric -> Metric -> Metric
Documentation
data Statistics
type StatisticsState a = forall m. MonadState Statistics m => m a
type StatisticsStateIO a = forall m. (MonadState Statistics m, MonadIO m) => m a
emptyStats :: Statistics
printOutAllMetrics :: StatisticsStateIO ()
printOutAllMetrics' :: Statistics -> IO ()
printOutInspectionMetrics :: StatisticsStateIO ()
showFinalStats :: Statistics -> String
initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> b
addMetric :: Metric -> StatisticsState ()
Adds a metric at the end of the list (thus, metrics are printed out in the order in which they were added
addInspectionMetric :: Metric -> StatisticsState ()
Adds a metric that will be printed out at regular intervals
setPrintOutInterval :: Int -> StatisticsState ()
mergeMetrics :: (Metric -> Metric -> Metric) -> Statistics -> Statistics -> Statistics
data Metric
Constructors
IntMetric String Int
show/hide Instances
queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a]
updateMetrics :: (Metric -> Metric) -> Statistics -> Statistics
incrIntMetric :: String -> Int -> Metric -> Metric
queryIntMetric :: String -> Metric -> Maybe Int
addIntMetrics :: Metric -> Metric -> Metric
Produced by Haddock version 2.1.0