sequor-0.7.2: A sequence labeler based on Collins's sequence perceptron.

Safe HaskellNone




type Token = [Text]Source

Token is a representation of a word, which consists of a number of fields.

type Field = TextSource

Field is a part of a word token, such as word form, lemma or POS tag.

type Label = TextSource

Label is a label associated to a token.

type Sentence = [Token]Source

Sentence is a sequence of tokens.

parse :: Text -> [Sentence]Source

parse text returns a lazy list of sentences.

toLabeled :: Sentence -> (Sentence, [Label])Source

toLabeled s converts the last field of each token in s to a label and returns a pair whose first element is the sentence and the second the corresponding sequence of labels.