concraft-pl-2.0.2: Morphological tagger for Polish

Safe HaskellNone
LanguageHaskell2010

NLP.Concraft.Polish.DAG.Morphosyntax

Contents

Description

DAG-aware morphosyntax data layer in Polish.

Synopsis

Tag

type Tag = Text Source #

A textual representation of a morphosyntactic tag.

Edge

data Word Source #

A word.

Constructors

Word 

Fields

Instances
Eq Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

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

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

Ord Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

compare :: Word -> Word -> Ordering #

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

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

(>) :: Word -> Word -> Bool #

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

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Show Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

ToJSON Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

FromJSON Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Binary Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

put :: Word -> Put #

get :: Get Word #

putList :: [Word] -> Put #

Word Word Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

orth :: Word -> Text #

oov :: Word -> Bool #

data Interp t Source #

A morphosyntactic interpretation.

Constructors

Interp 

Fields

Instances
Eq t => Eq (Interp t) Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

(==) :: Interp t -> Interp t -> Bool #

(/=) :: Interp t -> Interp t -> Bool #

Ord t => Ord (Interp t) Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

compare :: Interp t -> Interp t -> Ordering #

(<) :: Interp t -> Interp t -> Bool #

(<=) :: Interp t -> Interp t -> Bool #

(>) :: Interp t -> Interp t -> Bool #

(>=) :: Interp t -> Interp t -> Bool #

max :: Interp t -> Interp t -> Interp t #

min :: Interp t -> Interp t -> Interp t #

Show t => Show (Interp t) Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

showsPrec :: Int -> Interp t -> ShowS #

show :: Interp t -> String #

showList :: [Interp t] -> ShowS #

(Ord t, Binary t) => Binary (Interp t) Source # 
Instance details

Defined in NLP.Concraft.Polish.DAG.Morphosyntax

Methods

put :: Interp t -> Put #

get :: Get (Interp t) #

putList :: [Interp t] -> Put #

voidInterp :: t -> Interp t Source #

An almost empty interpretation, with only the tag actually specified.

data Space Source #

No space, space or newline. TODO: Perhaps we should use a bit more informative data type.

Constructors

None 
Space 
NewLine 
Instances
Eq Space Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

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

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

Ord Space Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

compare :: Space -> Space -> Ordering #

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

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

(>) :: Space -> Space -> Bool #

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

max :: Space -> Space -> Space #

min :: Space -> Space -> Space #

Show Space Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

showsPrec :: Int -> Space -> ShowS #

show :: Space -> String #

showList :: [Space] -> ShowS #

ToJSON Space Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

FromJSON Space Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Binary Space Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

put :: Space -> Put #

get :: Get Space #

putList :: [Space] -> Put #

selectWMap :: Ord a => WMap (Interp a) -> Seg Word (Interp a) -> Seg Word (Interp a) Source #

Select interpretations.

selectAnno :: Ord a => Map (Interp a) Double -> Seg Word (Interp a) -> Seg Word (Interp a) Source #

Select interpretations.

Sentence

type Sent t = DAG Space (Seg Word t) Source #

A sentence. type Sent t = DAG Space (Edge t)

data SentO t Source #

A sentence with its original textual representation.

Constructors

SentO 

Fields

restore :: Sent t -> Text Source #

Restore textual representation of a sentence. The function is not very accurate, it could be improved if we enriched the representation of spaces.

restore' :: Sent t -> Text Source #

A version of restore which places a space on each node.

withOrig :: Sent t -> SentO t Source #

Use restore to translate Sent to a SentO.

Conversion

packSent :: Ord a => Sent a -> Sent Word a Source #

Convert a sentence to a sentence from the core library.

packSentO :: Ord a => SentO a -> SentO Word a Source #

Convert a sentence to a sentence from the core library. packSentO :: P.Tagset -> SentO Tag -> X.SentO Word P.Tag