C# Class BayesClassifier.Classifier

Show file Open project: ArdaXi/Bayes.NET

Public Methods

Method Description
Add ( string category, IEnumerable phrases ) : void

Adds phrases to a category.

Add ( string category, string phrase ) : void

Adds a phrase to a category.

AddCategory ( string name, int>.Dictionary phrases ) : void

Adds a new category, replacing an existing one if necessary.

Classify ( IEnumerable phrases ) : double>.Dictionary

Classifies the given list, and returns the probability scores.

Private Methods

Method Description
GetCategory ( string name ) : Category
TotalCount ( ) : int

Method Details

Add() public method

Adds phrases to a category.
public Add ( string category, IEnumerable phrases ) : void
category string The category to add the phrases to. Will be created if necessary.
phrases IEnumerable The phrases to add.
return void

Add() public method

Adds a phrase to a category.
public Add ( string category, string phrase ) : void
category string The category to add the phrase to. Will be created if necessary.
phrase string The phrase to add.
return void

AddCategory() public method

Adds a new category, replacing an existing one if necessary.
public AddCategory ( string name, int>.Dictionary phrases ) : void
name string The name of the category.
phrases int>.Dictionary The phrases to add to it.
return void

Classify() public method

Classifies the given list, and returns the probability scores.
public Classify ( IEnumerable phrases ) : double>.Dictionary
phrases IEnumerable The phrases to classify.
return double>.Dictionary