KwTermLower Class Reference
Collaboration diagram for KwTermLower:

Public Member Functions

 KwTermLower (const int threshold)
 
bool operator() (const KwsTerm &left, const KwsTerm &right)
 

Private Attributes

const int threshold_
 

Detailed Description

Definition at line 30 of file kws-scoring.cc.

Constructor & Destructor Documentation

◆ KwTermLower()

KwTermLower ( const int  threshold)
inlineexplicit

Definition at line 32 of file kws-scoring.cc.

32 : threshold_(threshold) {}

Member Function Documentation

◆ operator()()

bool operator() ( const KwsTerm left,
const KwsTerm right 
)
inline

Definition at line 34 of file kws-scoring.cc.

References KwsTerm::end_time(), KwsTerm::start_time(), and KwTermLower::threshold_.

34  {
35  if ( (left.start_time() + threshold_) < right.start_time() ) {
36  return true;
37  } else {
38  return (left.end_time() + threshold_) < right.end_time();
39  }
40  }

Member Data Documentation

◆ threshold_

const int threshold_
private

Definition at line 43 of file kws-scoring.cc.

Referenced by KwTermLower::operator()().


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