C# Класс Segmenter.Base.Collectors.FrequencyDictionary

The finite set of unique words were extracted from a sequence of characters.
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

Clears this FrequencyDictionary so that it contains no words.
public Clear ( ) : void
Результат void

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

The clone.
public Clone ( ) : FrequencyDictionary
Результат FrequencyDictionary

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

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

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

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

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

The equals.
public Equals ( FrequencyDictionary other ) : bool
other FrequencyDictionary /// The other frequency dictionary. ///
Результат bool

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

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

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

Extracts new chars and their places of occurrence from a current char sequence
public Fill ( string str ) : void
str string the current char sequence
Результат void

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

Initializes a new instance of the FrequencyDictionary class.
public FrequencyDictionary ( ) : System
Результат System

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

Initializes a new instance of the FrequencyDictionary class.
public FrequencyDictionary ( ComplexChain sequence ) : System
sequence Segmenter.Base.Sequences.ComplexChain /// The sequence. ///
Результат System

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

Initializes a new instance of the FrequencyDictionary class.
public FrequencyDictionary ( string source ) : System
source string /// The source string. ///
Результат System

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

Returns the word to the index at a given
public GetWord ( int index ) : string
index int a specified cursorPosition of word
Результат string

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

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

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

Returns all words positions
public GetWordsPositions ( ) : List>
Результат List>

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

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

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

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

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

The sort by power.
public SortByPower ( ) : List>>.List
Результат List>>.List

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

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