A library of simple NLP algorithms.

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by Rogan Creswick
Maintained by

chatter is a collection of simple Natural Language Processing algorithms.

Chatter supports:

Chatter comes with models for POS tagging and Phrasal Chunking that have been trained on the Brown corpus (POS only) and the Conll2000 corpus (POS and Chunking)


= HEAD =

= =

  • Regenerated the model files; changes to cereal caused the old Average Perceptron models to throw exceptions on load, and as such, are no longer compatible. The packaged models have been updated.

  • Minor updates to slack build script.

= =

  • Bounded the version of cereal to < 0.5 because of breaking changes with cereal's default instances.

= =

  • Added deriving clauses for Class and Feature to support GHC 7.10; based on Rick Dzekman's pull request. Adds an explicit NFData instance for Perceptron.

= =

  • Added a Document type to better store term count indexes (essentially TermVectors with integer values).

  • Used the Document type for tf_idf; this changed the API, and is the reason for the B-level version bump. (also done for performance)

  • A number of non-breaking performance improvements (e.g., not using foldl in a few places.)

  • These changes, and much of are due to work by Tristan Ravitch & Jonathan Daugherty.

= = - B-level version bump because we added test dependency on unordered-containers, which could cause downstream issues.

  • TermVector: is a newtype now, and has its own arbitrary instance.

  • TermVector: adds addVectors, zeroVector, negate, and sum

  • DefaultMap: adds elems, map, and unionWith

  • Adds quickcheck properties for all of the above

= =

  • Switched to using Hashmap for the DefaultMap implementation; this may break compatibility with old binary stores.

= =

  • Removed an orphan instance for Text.

= =

  • Unceremoniously forced the Chunking model to do basic Named Entity Recognition, and added a simple NER model based on Nothman et al's WikiNER data set -- which is provided under a very permissive CC license. (

= =

  • Moved to Tasty from test-framework. I'm treating this as a c-level patch because it may have siginficant impact on the transitive dependencies.

= = - removed upper vesion bounds on many dependencies.

= =

  • Updates for mobx-0.3's changes to use Lazy Text.

= =

  • Added chunk, chunkText, and chunkStr functions to NLP.Chunk to make it easier to experiment with the chunker.

  • Added a formatting function to show ChunkedSententences (NLP.Types.Tree.showChunkedSent) that formats chunks in bracket notation, eg:

    chunkText tgr chk "The dog jumped over the reluctant cat." "[NP The/DT dog/NN] [VP jumped/VBD] [NP over/IN the/DT reluctant/JJ cat/NN] ./."

    Notice that the features still need some tuning for the chunker.

  • Moved the AveragePerceptron module into a NLP.ML (Machine Learning) module.

  • Added the 'tags-since-dt' feature to the AveragePerceptronChunker features and retrained the Conll2000 models.

= =

  • Added phrasal chunking via an Averaged Perceptron Chunker, trained on the Conll 2000 corpus.

  • Added a POS tagger trained on the Conll 2000 corpus, because the Conll chunker relies on that tagset.

  • Set the Conll 2000 POS tagger to the defaultTagger. Note that the tagset is much smaller than the Brown tagset used by the previous defaultTagger. The Brown tagger is still available from NLP.POS.brownTagger.

= =

  • Bumped dependency on base to >= 4.6 (from >= 4) because of Text.Read.readMaybe. This drops support for HP2012, and requires GHC 7.6 or newer.

  • fixed lots of warnings and added documentation.

= =

  • Changed the Sentence and TaggedSentence data types to be actual tree structures with real types at the respective layers. ChunkedSentence and ChunkOr were also added to facilitate phrase and clause chunking.

  • Added a POS Tag data type for Brown corpus tags, and a Chunk type for Chunks as well (in the Brown module, but that's probably not the best place, given that the chunks have nothing to do with the actual Brown corpus.)

  • Updated the Parsec Examples to use the typed tags/chunks.

  • Regenerated the defaultTager, it uses the Brown tags now instead of RawTag.

= =

  • I realized immediately after the release that I broke the defaultTagger by adding the protectTerms function to the LiteralTagger. Things broke because (i) there are bugs in that functionality, which uses run-time assembled regexes, and (ii) the UnambiguousTagger used in the defaultTagger delegates to an instance of the LiteralTagger, which pulled in the (semi-broken) protectTerms function. This has been fixed by replacing the tokenizer when the LiteralTagger is used as an UnambiguousTagger -- the later tager doesn't need the functionality, and it should never have been used there anyway.

  • Added a bevy of tests to cover the above fix.

  • Added tests (currently breaking) that exercise the broken bits of the protectTerms function.

= =

  • Added support for expressing information extraciton patterns via Parsec.
  • Misc. bug fixes.
comments powered byDisqus