C# Класс FrequencyAnalyzer.FrequencyCalculation

Contains the logic for calculating the frequency of each word in the document. This class should be run using a BackgroundWorker object, which is then passed in as a parameter in the constructor.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
FrequencyCalculation ( BackgroundWorker bw, Words words, int start_word, int end_word, bool tosave ) : System

Set up the class with the BackgroundWorker class being used for this comptuation (to allow for callbacks), the words in the document, the total number of tokens, and an indication of whether the results will be displayed onscreen or saved to file.

isNumeric ( string val ) : bool

http://www.codeproject.com/KB/cs/IsNumeric.aspx

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

Метод Описание
getResult ( ) : ResultContainer

Calculate the number of occurences of each word contained in the 'words' field.

isToBeCounted ( String word ) : bool

Whether the given word is to be counted as part of the word frequencies. It will be counted if it is not part of the ignore list and (if ignoring numbers is enabled) if it is not a number.

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

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

Set up the class with the BackgroundWorker class being used for this comptuation (to allow for callbacks), the words in the document, the total number of tokens, and an indication of whether the results will be displayed onscreen or saved to file.
public FrequencyCalculation ( BackgroundWorker bw, Words words, int start_word, int end_word, bool tosave ) : System
bw System.ComponentModel.BackgroundWorker the BackgroundWorker class being used for this comptuation (to allow for callbacks)
words Words an array of the words in the document
start_word int the word on which this frequency calculator will start counting (including punctuation marks) from the words array. /// The lowest allowable value for this parameter is 1.
end_word int
tosave bool whether the result will be saved to CSV (true) or displayed in the taskpane (false).
Результат System

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

http://www.codeproject.com/KB/cs/IsNumeric.aspx
public isNumeric ( string val ) : bool
val string
Результат bool