chatter-0.1.0.4: A library of simple NLP algorithms.

Safe HaskellNone

NLP.Corpora.Parsing

Synopsis

Documentation

readPOS :: Text -> TaggedSentenceSource

Read a POS-tagged corpus out of a Text string of the form: token/tag token/tag...

>>> readPOS "Dear/jj Sirs/nns :/: Let/vb"
[("Dear",JJ),("Sirs",NNS),(":",Other ":"),("Let",VB)]

safeInit :: Text -> TextSource

Returns all but the last element of a string, unless the string is empty, in which case it returns that string.