C# 클래스 Phamhilator.NLP.BagOfWords

파일 보기 프로젝트 열기: ArcticEcho/Phamhilator

공개 메소드들

메소드 설명
AddDocument ( uint documentID, ushort>.IDictionary termTFs ) : void
BagOfWords ( ) : System
BagOfWords ( Term>.IDictionary terms ) : System
BagOfWords ( IEnumerable terms ) : System
ContainsDocument ( uint docID ) : bool
GetSimilarity ( IEnumerable terms, ushort 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, ushort>.IDictionary termTFs ) : void

비공개 메소드들

메소드 설명
CalculateDocumentLength ( uint docID, List terms ) : float
CalculateQueryLength ( float>.Dictionary queryVector ) : float
CalculateQueryTfIdfVector ( IEnumerable terms ) : float>.Dictionary
GetDocument ( uint docID ) : List

메소드 상세

AddDocument() 공개 메소드

public AddDocument ( uint documentID, ushort>.IDictionary termTFs ) : void
documentID uint
termTFs ushort>.IDictionary
리턴 void

BagOfWords() 공개 메소드

public BagOfWords ( ) : System
리턴 System

BagOfWords() 공개 메소드

public BagOfWords ( Term>.IDictionary terms ) : System
terms Term>.IDictionary
리턴 System

BagOfWords() 공개 메소드

public BagOfWords ( IEnumerable terms ) : System
terms IEnumerable
리턴 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 ( IEnumerable terms, ushort maxDocsToReturn ) : float>.Dictionary
terms IEnumerable A collection of tokens (i.e., words) for a given string.
maxDocsToReturn ushort
리턴 float>.Dictionary

RecalculateIDFs() 공개 메소드

public RecalculateIDFs ( ) : void
리턴 void

RemoveDocument() 공개 메소드

public RemoveDocument ( uint documentID, ushort>.IDictionary termTFs ) : void
documentID uint
termTFs ushort>.IDictionary
리턴 void