concraft-0.14.2: Morphological disambiguation based on constrained CRFs

Safe HaskellNone
LanguageHaskell98

NLP.Concraft.Morphosyntax

Contents

Description

Types and functions related to the morphosyntax data layer.

Synopsis

Segment

data Seg w t Source #

A segment parametrized over a word type and a tag type.

Constructors

Seg 

Fields

  • word :: w

    A word represented by the segment. Typically it will be an instance of the Word class.

  • tags :: WMap t

    A set of interpretations. To each interpretation a weight of appropriateness within the context is assigned.

Instances
(Show w, Show t) => Show (Seg w t) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax

Methods

showsPrec :: Int -> Seg w t -> ShowS #

show :: Seg w t -> String #

showList :: [Seg w t] -> ShowS #

ToJSON w => ToJSON (Seg w Text) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax

FromJSON w => FromJSON (Seg w Text) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax

Word w => Word (Seg w t) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax

Methods

orth :: Seg w t -> Text Source #

oov :: Seg w t -> Bool Source #

mapSeg :: Ord b => (a -> b) -> Seg w a -> Seg w b Source #

Map function over segment tags.

interpsSet :: Seg w t -> Set t Source #

Interpretations of the segment.

interps :: Seg w t -> [t] Source #

Interpretations of the segment.

Word class

class Word a where Source #

Methods

orth :: a -> Text Source #

Orthographic form.

oov :: a -> Bool Source #

Out-of-vocabulary (OOV) word.

Instances
Word w => Word (Seg w t) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax

Methods

orth :: Seg w t -> Text Source #

oov :: Seg w t -> Bool Source #

Sentence

type Sent w t = [Seg w t] Source #

A sentence.

mapSent :: Ord b => (a -> b) -> Sent w a -> Sent w b Source #

Map function over sentence tags.

data SentO w t Source #

A sentence with original, textual representation.

Constructors

SentO 

Fields

Instances
(Show w, Show t) => Show (SentO w t) Source # 
Instance details

Defined in NLP.Concraft.Morphosyntax

Methods

showsPrec :: Int -> SentO w t -> ShowS #

show :: SentO w t -> String #

showList :: [SentO w t] -> ShowS #

mapSentO :: Ord b => (a -> b) -> SentO w a -> SentO w b Source #

Map function over sentence tags.

Weighted collection