chatter-0.9.0.0: A library of simple NLP algorithms.

Safe HaskellNone
LanguageHaskell2010

NLP.POS.UnambiguousTagger

Description

This POS tagger deterministically tags tokens. However, if it ever sees multiple tags for the same token, it will forget the tag it has learned. This is useful for creating taggers that have very high precision, but very low recall.

Unambiguous taggers are also useful when defined with a non-deterministic backoff tagger, such as an NLP.POS.AveragedPerceptronTagger, since the high-confidence tags will be applied first, followed by the more non-deterministic results of the backoff tagger.

Synopsis

Documentation

mkTagger :: Tag t => Map Text t -> Maybe (POSTagger t) -> POSTagger t Source #

Create an unambiguous tagger, using the supplied Map as a source of tags.

train :: Tag t => Map Text t -> [TaggedSentence t] -> Map Text t Source #

Trainer method for unambiguous taggers.