C# Class NClassifier.Utilities

Afficher le fichier Open project: colin-dumitru/Proiect-AI-2012---GUI

Méthodes publiques

Méthode Description
CountWords ( string word, string words ) : int

Count how many times a word appears in an array of words.

GetSentences ( string input ) : string[]

Gets an array of sentences.

GetUniqueWords ( string input ) : string[]

Find all unique words in an array of words.

GetWordFrequency ( string input ) : Hashtable
GetWordFrequency ( string input, bool caseSensitive ) : Hashtable
GetWordFrequency ( string input, bool caseSensitive, ITokenizer tokenizer, IStopWordProvider stopWordProvider ) : Hashtable

Gets a Hashtable of words and integers representing the number of each word.

IsWord ( string word ) : bool

Method Details

CountWords() public static méthode

Count how many times a word appears in an array of words.
public static CountWords ( string word, string words ) : int
word string The word to count.
words string A non-null array of words.
Résultat int

GetSentences() public static méthode

Gets an array of sentences.
public static GetSentences ( string input ) : string[]
input string A string that contains sentences.
Résultat string[]

GetUniqueWords() public static méthode

Find all unique words in an array of words.
public static GetUniqueWords ( string input ) : string[]
input string An array of strings.
Résultat string[]

GetWordFrequency() public static méthode

public static GetWordFrequency ( string input ) : Hashtable
input string
Résultat System.Collections.Hashtable

GetWordFrequency() public static méthode

public static GetWordFrequency ( string input, bool caseSensitive ) : Hashtable
input string
caseSensitive bool
Résultat System.Collections.Hashtable

GetWordFrequency() public static méthode

Gets a Hashtable of words and integers representing the number of each word.
public static GetWordFrequency ( string input, bool caseSensitive, ITokenizer tokenizer, IStopWordProvider stopWordProvider ) : Hashtable
input string The string to get the word frequency of.
caseSensitive bool True if words should be treated as separate if they have different casing.
tokenizer ITokenizer A instance of ITokenizer.
stopWordProvider IStopWordProvider An instance of IStopWordProvider.
Résultat System.Collections.Hashtable

IsWord() public static méthode

public static IsWord ( string word ) : bool
word string
Résultat bool