concraft-pl-2.0.2: Morphological tagger for Polish

Safe HaskellNone
LanguageHaskell2010

NLP.Concraft.Polish.Morphosyntax

Contents

Description

Morphosyntax data layer in Polish.

Synopsis

Tag

type Tag = Text Source #

A textual representation of a morphosyntactic tag.

Segment

data Seg t Source #

A segment consists of a word and a set of morphosyntactic interpretations.

Constructors

Seg 

Fields

  • word :: Word
     
  • interps :: WMap (Interp t)

    Interpretations of the token, each interpretation annotated with a disamb Boolean value (if True, the interpretation is correct within the context).

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

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

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

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

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

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

compare :: Seg t -> Seg t -> Ordering #

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

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

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

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

max :: Seg t -> Seg t -> Seg t #

min :: Seg t -> Seg t -> Seg t #

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

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

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

show :: Seg t -> String #

showList :: [Seg t] -> ShowS #

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

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

put :: Seg t -> Put #

get :: Get (Seg t) #

putList :: [Seg t] -> Put #

data Word Source #

A word.

Constructors

Word 

Fields

Instances
Eq Word Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

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

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

Ord Word Source # 
Instance details

Defined in NLP.Concraft.Polish.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.Morphosyntax

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

ToJSON Word Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

FromJSON Word Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Binary Word Source # 
Instance details

Defined in NLP.Concraft.Polish.Morphosyntax

Methods

put :: Word -> Put #

get :: Get Word #

putList :: [Word] -> Put #

Word Word Source # 
Instance details

Defined in NLP.Concraft.Polish.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.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.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.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.Morphosyntax

Methods

put :: Interp t -> Put #

get :: Get (Interp t) #

putList :: [Interp t] -> Put #

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 #

select :: Ord a => a -> Seg a -> Seg a Source #

Select one chosen interpretation.

select' :: Ord a => [a] -> a -> Seg a -> Seg a Source #

Select multiple interpretations and one chosen interpretation.

selectWMap :: Ord a => WMap a -> Seg a -> Seg a Source #

Select interpretations.

Sentence

type Sent t = [Seg t] Source #

A sentence.

data SentO t Source #

A sentence.

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 enrich representation of a space.

withOrig :: Sent t -> SentO t Source #

Use restore to translate Sent to a SentO.

Conversion

packSeg :: Tagset -> Seg Tag -> Seg Word Tag Source #

Convert a segment to a segment from a core library.

packSent :: Tagset -> Sent Tag -> Sent Word Tag Source #

Convert a sentence to a sentence from a core library.

packSentO :: Tagset -> SentO Tag -> SentO Word Tag Source #

Convert a sentence to a sentence from a core library.