Safe Haskell | None |
---|---|
Language | Haskell2010 |
DAG-aware morphosyntax data layer in Polish.
Synopsis
- type Tag = Text
- data Word = Word {}
- data Interp t = Interp {}
- voidInterp :: t -> Interp t
- data Space
- selectWMap :: Ord a => WMap (Interp a) -> Seg Word (Interp a) -> Seg Word (Interp a)
- selectAnno :: Ord a => Map (Interp a) Double -> Seg Word (Interp a) -> Seg Word (Interp a)
- type Sent t = DAG Space (Seg Word t)
- data SentO t = SentO {}
- restore :: Sent t -> Text
- restore' :: Sent t -> Text
- withOrig :: Sent t -> SentO t
- packSent :: Ord a => Sent a -> Sent Word a
- packSentO :: Ord a => SentO a -> SentO Word a
Tag
Edge
A word.
A morphosyntactic interpretation.
voidInterp :: t -> Interp t Source #
An almost empty interpretation, with only the tag
actually specified.
No space, space or newline. TODO: Perhaps we should use a bit more informative data type.
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
A sentence with its original textual representation.
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.