concraft-0.14.0: Morphological disambiguation based on constrained CRFs

Safe HaskellNone
LanguageHaskell98

NLP.Concraft.DAG.Morphosyntax.Accuracy

Contents

Description

Accuracy statistics.

Synopsis

Stats

data Stats Source #

True positives, false positives, etc.

Constructors

Stats 

Fields

  • tp :: !Int

    True positive

  • fp :: !Int

    False positive

  • tn :: !Int

    True negative

  • fn :: !Int

    False negative

  • ce :: !Int

    Consistency error (number of edges for which both fp and fn hold)

Instances
Eq Stats Source # 
Instance details

Defined in NLP.Concraft.DAG.Morphosyntax.Accuracy

Methods

(==) :: Stats -> Stats -> Bool #

(/=) :: Stats -> Stats -> Bool #

Ord Stats Source # 
Instance details

Defined in NLP.Concraft.DAG.Morphosyntax.Accuracy

Methods

compare :: Stats -> Stats -> Ordering #

(<) :: Stats -> Stats -> Bool #

(<=) :: Stats -> Stats -> Bool #

(>) :: Stats -> Stats -> Bool #

(>=) :: Stats -> Stats -> Bool #

max :: Stats -> Stats -> Stats #

min :: Stats -> Stats -> Stats #

Show Stats Source # 
Instance details

Defined in NLP.Concraft.DAG.Morphosyntax.Accuracy

Methods

showsPrec :: Int -> Stats -> ShowS #

show :: Stats -> String #

showList :: [Stats] -> ShowS #

data AccCfg x Source #

Configuration of accuracy computation.

Constructors

AccCfg 

Fields

  • onlyOov :: Bool

    Limit calculations to OOV words

  • onlyAmb :: Bool

    Limit calculations to segmentation-ambiguous words

  • onlyMarkedWith :: Set x

    Limit calculations to segments marked with one of the given labels; if empty, the option has no effect

  • accTagset :: Tagset

    The underlying tagset

  • expandTag :: Bool

    Should the tags be expanded?

  • ignoreTag :: Bool

    Compute segmentation-level accurracy. The actually chosen tags are ignored, only information about the chosen DAG edges is relevant.

  • weakAcc :: Bool

    If weak, there has to be an overlap in the tags assigned to a given segment in both datasets. Otherwise, the two sets of tags have to be identical.

  • discardProb0 :: Bool

    Whether sentences with near 0 probability should be discarded from evaluation.

  • verbose :: Bool

    Print information about compared elements

collect Source #

Arguments

:: (Word w, Ord x, Show x) 
=> AccCfg x 
-> [Sent w (Tag, x)]

Gold dataset

-> [Sent w (Tag, x)]

Tagged dataset (to be compare with the gold)

-> Stats 

Compute the accuracy of the model with respect to the labeled dataset. To each Tag an additional information x can be assigned, which will be taken into account when computing statistics.