C# Класс Ada.Matchers.BoWPoS.BagOfWords

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

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

Метод Описание
AddDocument ( uint documentID, uint>.IDictionary termTFs ) : void
BagOfWords ( ) : System
BagOfWords ( Term>.IDictionary terms, bool idfsCalculated = false ) : System
BagOfWords ( IEnumerable terms, bool idfsCalculated = false ) : System
ContainsDocument ( uint docID ) : bool
GetSimilarity ( uint>.IDictionary terms, uint maxDocsToReturn ) : float>.Dictionary

Calculates the cosine similarity of the given strings (normally words) compared to the current collection of Terms.

RecalculateIDFs ( ) : void
RemoveDocument ( uint documentID, uint>.IDictionary termTFs ) : void

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

Метод Описание
CalculateDocumentLength ( uint docID, List terms ) : float
CalculateQueryLength ( float>.Dictionary queryVector ) : float
CalculateQueryTfIdfVector ( uint>.IDictionary tf ) : float>.Dictionary

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

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

public AddDocument ( uint documentID, uint>.IDictionary termTFs ) : void
documentID uint
termTFs uint>.IDictionary
Результат void

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

public BagOfWords ( ) : System
Результат System

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

public BagOfWords ( Term>.IDictionary terms, bool idfsCalculated = false ) : System
terms Term>.IDictionary
idfsCalculated bool
Результат System

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

public BagOfWords ( IEnumerable terms, bool idfsCalculated = false ) : System
terms IEnumerable
idfsCalculated bool
Результат System

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

public ContainsDocument ( uint docID ) : bool
docID uint
Результат bool

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

Calculates the cosine similarity of the given strings (normally words) compared to the current collection of Terms.
public GetSimilarity ( uint>.IDictionary terms, uint maxDocsToReturn ) : float>.Dictionary
terms uint>.IDictionary A collection of tokens (i.e., words) for a given string.
maxDocsToReturn uint
Результат float>.Dictionary

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

public RecalculateIDFs ( ) : void
Результат void

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

public RemoveDocument ( uint documentID, uint>.IDictionary termTFs ) : void
documentID uint
termTFs uint>.IDictionary
Результат void