C# Класс BayesClassifier.Classifier

Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetCategory ( string name ) : Category
TotalCount ( ) : int

Описание методов

Add() публичный Метод

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.
Результат void

Add() публичный Метод

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.
Результат void

AddCategory() публичный Метод

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.
Результат void

Classify() публичный Метод

Classifies the given list, and returns the probability scores.
public Classify ( IEnumerable phrases ) : double>.Dictionary
phrases IEnumerable The phrases to classify.
Результат double>.Dictionary