LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher Class Reference

#include <linguisticProcessing/core/WordSenseAnalysis/KnnSearcher.h>

Public Member Functions

 KnnSearcher (const std::map< std::string, std::string > &knnsearchConfig)
 
 ~KnnSearcher ()
 
int getKNN (uint64_t lemmaId, SemanticContext::const_iterator itContext, NNList &knns)
 
uint64_t owner2Sys (uint64_t ownerId)
 
uint64_t sys2Owner (uint64_t systemId)
 

Protected Member Functions

void mapHashKey (std::string relation)
 
LSHSignature * buildSignature (SemanticContext::const_iterator itContext)
 
int fastKNNSort (HashedDB &xoredDB, vectorCount *finalResult)
 

Protected Attributes

std::string m_hashedDir
 
HashedData m_data
 
char * m_hkMap
 
uint64_t m_hkMapSize
 
int m_nbVectors
 
int m_nbDims
 
int m_signatureLength
 
int m_totalPermutations
 
int m_beam
 
int m_k
 
std::map< uint64_t, uint64_t > m_owner2System
 
std::map< uint64_t, uint64_t > m_system2Owner
 

Detailed Description

Definition at line 34 of file KnnSearcher.h.

Constructor & Destructor Documentation

◆ KnnSearcher()

Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::KnnSearcher ( const std::map< std::string, std::string > &  knnsearchConfig)

Definition at line 31 of file KnnSearcher.cpp.

◆ ~KnnSearcher()

Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::~KnnSearcher ( )

Definition at line 116 of file KnnSearcher.cpp.

Member Function Documentation

◆ buildSignature()

LSHSignature * Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::buildSignature ( SemanticContext::const_iterator  itContext)
protected

Definition at line 290 of file KnnSearcher.cpp.

◆ fastKNNSort()

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::fastKNNSort ( HashedDB &  xoredDB,
vectorCount *  finalResult 
)
protected

Definition at line 208 of file KnnSearcher.cpp.

◆ getKNN()

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::getKNN ( uint64_t  lemmaId,
SemanticContext::const_iterator  itContext,
NNList &  knns 
)

Definition at line 126 of file KnnSearcher.cpp.

◆ mapHashKey()

void Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::mapHashKey ( std::string  relation)
protected

Definition at line 393 of file KnnSearcher.cpp.

◆ owner2Sys()

uint64_t Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::owner2Sys ( uint64_t  ownerId)

Definition at line 440 of file KnnSearcher.cpp.

◆ sys2Owner()

uint64_t Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::sys2Owner ( uint64_t  systemId)

Definition at line 450 of file KnnSearcher.cpp.

Member Data Documentation

◆ m_beam

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_beam
protected

Definition at line 57 of file KnnSearcher.h.

◆ m_data

HashedData Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_data
protected

Definition at line 49 of file KnnSearcher.h.

◆ m_hashedDir

std::string Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_hashedDir
protected

Definition at line 48 of file KnnSearcher.h.

◆ m_hkMap

char* Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_hkMap
protected

Definition at line 50 of file KnnSearcher.h.

◆ m_hkMapSize

uint64_t Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_hkMapSize
protected

Definition at line 51 of file KnnSearcher.h.

◆ m_k

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_k
protected

Definition at line 58 of file KnnSearcher.h.

◆ m_nbDims

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_nbDims
protected

Definition at line 54 of file KnnSearcher.h.

◆ m_nbVectors

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_nbVectors
protected

Definition at line 53 of file KnnSearcher.h.

◆ m_owner2System

std::map<uint64_t,uint64_t> Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_owner2System
protected

Definition at line 60 of file KnnSearcher.h.

◆ m_signatureLength

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_signatureLength
protected

Definition at line 55 of file KnnSearcher.h.

◆ m_system2Owner

std::map<uint64_t, uint64_t> Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_system2Owner
protected

Definition at line 61 of file KnnSearcher.h.

◆ m_totalPermutations

int Lima::LinguisticProcessing::WordSenseDisambiguation::KnnSearcher::m_totalPermutations
protected

Definition at line 56 of file KnnSearcher.h.


The documentation for this class was generated from the following files: