sequor-0.7.0: A sequence labeler based on Collins's sequence perceptron.
NLP.Sequor.CoNLL
Synopsis
type Token = [Text]Source
Token is a representation of a word, which consists of a number of fields.
Token
type Field = TextSource
Field is a part of a word token, such as word form, lemma or POS tag.
Field
type Label = TextSource
Label is a label associated to a token.
Label
type Sentence = [Token]Source
Sentence is a sequence of tokens.
Sentence
parse :: Text -> [Sentence]Source
parse text returns a lazy list of sentences.
parse text
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.
toLabeled s
s