Skip to content

Latest commit

 

History

History
89 lines (64 loc) · 4.03 KB

README.md

File metadata and controls

89 lines (64 loc) · 4.03 KB

gobay Build Status GoDoc Project Stats

Package gobay implements Naive Bayesian Classifier for sentiment analysis. (Naive Bayesian Classifier - Wikipedia)

YouTube Clips by me

↑ top

Getting Started

go get github.com/gyuho/gobay

↑ top

Package Hierarchy

bay/		# Naive Bayesian Classifier
data/		# Training Data
example/	# Example Code
slm/		# Slice, Map Operations

↑ top

Example

func Test_NBC_2(test *testing.T) {
	DATA_amazon := bay.GetStruct("../data/train - amazon.csv")
	include := bay.GetInclFt("../data/filter - include.csv")
	exclude := bay.GetExcFt("../data/filter - exclude.csv")

	// Totally unfamiliar sentence
	// (Correct Classification!)
	// Now this data is trained

	bay.Print(DATA_amazon, include, exclude, "High quality code samples. It must be said: Mark Summerfield is a REALLY good programmer. All of the code in this book gives the impression of being well thought out. The other books had a lot of cargo cult programming, meaning the authors were going through the motions without thinking about what they were doing.")

	// Output:
	// Positive: High quality code samples. It must be said: Mark Summerfield is a REALLY good programmer. All of the code in this book gives the impression of being well thought out. The other books had a lot of cargo cult programming, meaning the authors were going through the motions without thinking about what they were doing.
}

↑ top

Training Data

Training and filter data are to be frequentyly updated, directly on GitHub and Google Docs.

↑ top

To-Do-List

  • Update Bayesian algorithms for some exceptional cases

↑ top