concraft-0.3.0: Morphosyntactic tagging tool based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Format

Description

The module provides several abstractions for representing external data formats. Concraft will be able to work with any format which implements those abstractions.

Synopsis

Documentation

type Tag = TextSource

Textual representation of morphposyntactic tag.

data Word w Source

Words handler.

Constructors

Word 

Fields

extract :: w -> Word Tag

Extract information relevant for tagging.

select :: WMap Tag -> w -> w

Select the set of morphosyntactic interpretations.

data Sent s w Source

Sentence handler.

Constructors

Sent 

Fields

parseSent :: s -> [w]

Split sentence into a list of words.

mergeSent :: [w] -> s -> s

Merge words with a sentence.

wordHandler :: Word w

Words handler.

data Doc f s w Source

Document format.

Constructors

Doc 

Fields

parseDoc :: Text -> f s

Parse textual interpretations into a functor with sentence elements.

showDoc :: f s -> Text

Show textual reprezentation of a document.

sentHandler :: Sent s w

Sentence handler.