hext: a text classification library

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.



Please see README.md

[Skip to ReadMe]


Change logNone available
Dependenciesbase (>=4.7 && <5), containers, hext, text [details]
Copyright2016 David Anekstein
AuthorDavid Anekstein
CategoryNatural Language Processing
Home pagehttps://github.com/aneksteind/hext#readme
Source repositoryhead: git clone https://github.com/aneksteind/hext
UploadedWed Jul 27 20:12:06 UTC 2016 by aneksteind




Maintainers' corner

For package maintainers and hackage trustees

Readme for hext-

[back to package description]


This is currently the beginning of a text classification library.

Currently, the only algorithm implementation is the Naive Bayes algorithm: to run your own data through this algorithm in order to classify your text, you need:

In order to run the program, the classified data specified above must be run through the makeMaterial function in NLP.Hext.NaiveBayes.

Before doing this, however, you must create a data type, its data constructors each representing a class to label each text sample with. An example of this can be seen in app/Main.hs where data Class = Positive | Negative deriving (Eq, Show) to label movie reviews as positive or negative.

Now that the learning material has been made with makeMaterial, it, along with a new string for the algorithm to classify, can be passed into runBayes like so: runBayes material "This is a sample review". An example, along with sample data, can be seen in app/Main.hs

hackage - https://hackage.haskell.org/package/hext-