hext: a text classification library

[ bsd3, library, natural-language-processing, program ] [ Propose Tags ]

Please see README.md


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4
Dependencies base (>=4.7 && <5), containers, hext, text [details]
License BSD-3-Clause
Copyright 2016 David Anekstein
Author David Anekstein
Maintainer aneksteind@gmail.com
Category Natural Language Processing
Home page https://github.com/aneksteind/hext#readme
Source repo head: git clone https://github.com/aneksteind/hext
Uploaded by aneksteind at Wed Jul 27 20:12:58 UTC 2016
Distributions NixOS:0.1.0.4
Executables hext-exe
Downloads 1176 total (55 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2016-07-27 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hext-0.1.0.2

[back to package description]

hext

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:

  • classified data: this can be sourced from a database where the only fields that are needed are the text itself, and it's class
  • a sample string which will be classified by the algorithm

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-0.1.0.2