C# Class Segmenter.Base.Collectors.FrequencyDictionary

The finite set of unique words were extracted from a sequence of characters.
Datei anzeigen Open project: intervals-mining-lab/libiada-core Class Usage Examples

Public Methods

Method Description
Add ( string str, List pos ) : void

Maps the specified word to the specified list of cursorPosition in a sequence.

Clear ( ) : void

Clears this FrequencyDictionary so that it contains no words.

Clone ( ) : FrequencyDictionary

The clone.

Contains ( List str ) : bool

Returns true if this FrequencyDictionary contains the specified word. More formally, returns true if and only if this FrequencyDictionary contains at least one word.

Contains ( string str ) : bool

Returns true if this FrequencyDictionary contains the specified word. More formally, returns true if and only if this FrequencyDictionary contains at least one word.

Equals ( FrequencyDictionary other ) : bool

The equals.

Fill ( ComplexChain sequence ) : void

Extracts new words and their places of occurrence from a current word sequence

Fill ( string str ) : void

Extracts new chars and their places of occurrence from a current char sequence

FrequencyDictionary ( ) : System

Initializes a new instance of the FrequencyDictionary class.

FrequencyDictionary ( ComplexChain sequence ) : System

Initializes a new instance of the FrequencyDictionary class.

FrequencyDictionary ( string source ) : System

Initializes a new instance of the FrequencyDictionary class.

GetWord ( int index ) : string

Returns the word to the index at a given

GetWords ( ) : List

Returns a list of words of this FrequencyDictionary. Be careful! The new word can not be added to the end of the list as the data are hashed

GetWordsPositions ( ) : List>

Returns all words positions

Put ( string str, int pos ) : void

Maps the specified word to the specified cursorPosition in a sequence.

Remove ( string str ) : void

Removes the word (and its corresponding a list of positions) from this FrequencyDictionary. This method does nothing if the key is not in the FrequencyDictionary.

SortByPower ( ) : List>>.List

The sort by power.

this ( string str ) : List

Returns the list of positions to which the specified word is mapped, or null if this FrequencyDictionary contains no mapping for the word.

Method Details

Add() public method

Maps the specified word to the specified list of cursorPosition in a sequence.
public Add ( string str, List pos ) : void
str string the new word
pos List word's positions in the sequence
return void

Clear() public method

Clears this FrequencyDictionary so that it contains no words.
public Clear ( ) : void
return void

Clone() public method

The clone.
public Clone ( ) : FrequencyDictionary
return FrequencyDictionary

Contains() public method

Returns true if this FrequencyDictionary contains the specified word. More formally, returns true if and only if this FrequencyDictionary contains at least one word.
public Contains ( List str ) : bool
str List /// word is built from letters /// whose presence in this FrequencyDictionary is to be tested ///
return bool

Contains() public method

Returns true if this FrequencyDictionary contains the specified word. More formally, returns true if and only if this FrequencyDictionary contains at least one word.
public Contains ( string str ) : bool
str string word whose presence in this FrequencyDictionary is to be tested
return bool

Equals() public method

The equals.
public Equals ( FrequencyDictionary other ) : bool
other FrequencyDictionary /// The other frequency dictionary. ///
return bool

Fill() public method

Extracts new words and their places of occurrence from a current word sequence
public Fill ( ComplexChain sequence ) : void
sequence Segmenter.Base.Sequences.ComplexChain the current word sequence
return void

Fill() public method

Extracts new chars and their places of occurrence from a current char sequence
public Fill ( string str ) : void
str string the current char sequence
return void

FrequencyDictionary() public method

Initializes a new instance of the FrequencyDictionary class.
public FrequencyDictionary ( ) : System
return System

FrequencyDictionary() public method

Initializes a new instance of the FrequencyDictionary class.
public FrequencyDictionary ( ComplexChain sequence ) : System
sequence Segmenter.Base.Sequences.ComplexChain /// The sequence. ///
return System

FrequencyDictionary() public method

Initializes a new instance of the FrequencyDictionary class.
public FrequencyDictionary ( string source ) : System
source string /// The source string. ///
return System

GetWord() public method

Returns the word to the index at a given
public GetWord ( int index ) : string
index int a specified cursorPosition of word
return string

GetWords() public method

Returns a list of words of this FrequencyDictionary. Be careful! The new word can not be added to the end of the list as the data are hashed
public GetWords ( ) : List
return List

GetWordsPositions() public method

Returns all words positions
public GetWordsPositions ( ) : List>
return List>

Put() public method

Maps the specified word to the specified cursorPosition in a sequence.
public Put ( string str, int pos ) : void
str string a new word
pos int a cursorPosition of the word in the sequence
return void

Remove() public method

Removes the word (and its corresponding a list of positions) from this FrequencyDictionary. This method does nothing if the key is not in the FrequencyDictionary.
public Remove ( string str ) : void
str string the word that needs to be removed
return void

SortByPower() public method

The sort by power.
public SortByPower ( ) : List>>.List
return List>>.List

this() public method

Returns the list of positions to which the specified word is mapped, or null if this FrequencyDictionary contains no mapping for the word.
public this ( string str ) : List
str string the word whose associated the list of positions is to be returned
return List