ddc
Classes | Macros | Functions | Variables
QueryNode.h File Reference
#include "ConcHolder.h"
Include dependency graph for QueryNode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CQueryNode
 CQueryNode is an abstract class for any node in a query parse tree. A parse tree is built by YACC during CQueryCompiler::ParseQuery. This class contains all members which are common to atomic and operation nodes. More...
 
class  CQueryBinaryOperationNode
 
class  CQueryAndOperation
 CQueryAndOperation implements the hit intersection or "and" operator: for example, "Mother&&father". More...
 
class  CQueryOrOperation
 CQueryOrOperation implements the hit union or "or" operator: for example, "Mother||father". More...
 
class  CQueryTokenNode
 CQueryTokenNode is a class which corresponds to one token or it's singular property (for example lemma) More...
 
class  CQuerySequenceNode
 CQuerySequenceNode is an implementation of sequence operator, for example, "Mother and father". This class holds a sequence of nodes of type CQueryTokenNode (slot m_Items). Between m_Items[i] and m_Items[i+1] must be no more than m_Distances[i] tokens. More...
 
class  CQueryNearNode
 CQueryNearNode is a class which is used to search two or three child nodes, which are inside some text period of length CQueryNearNode::m_Distance , i.e. an implementation of "near" operator NEAR(a,b,2) and NEAR(a,b,c, 2). Note that for the 3-subquery form NEAR(a,b,c, n), n specifies the maximum number of tokens between ANY PAIR of subqueries (a,b), (b,c), or (a,c). More...
 
class  CQueryWithNode
 CQueryWithNode is a class which is used to search a node which simultaneously has two properties, namely m_pChild1 and m_pChild2. (implementation of "with" operator: for example, Mother with [NOUN] ) More...
 
class  CQueryWithoutNode
 CQueryWithoutNode: (EXPR1 without EXPR2) behaves like (EXPR1 WITH !EXPR2) More...
 
class  CQueryWithorNode
 CQueryWithorNode: (EXPR1 withor EXPR2) behaves like (EXPR1 || EXPR2) under token-identity. More...
 
struct  CQOccurrenceIterator
 CQOccurrenceIterator (formerly CQNearEvalItem) is used to iterate over query occurrences; used by near() queries. More...
 
struct  CQTokenOccurrenceIterator
 CQTokenOccurrenceIterator (formerly CQNearEvalItem) is used to iterate over query occurrences;. More...
 

Macros

#define DDC_OCCITER_LB_COEF   4
 

Functions

void GetWordForms (const MorphLanguageEnum Langua, const string &src, set< string > &WordForms)
 

Variables

const size_t MaxDistanceForNear
 

Macro Definition Documentation

◆ DDC_OCCITER_LB_COEF

#define DDC_OCCITER_LB_COEF   4

DDC_OCCITER_LB_COEF

heuristic for approximating number of linear-search ops per binary-search visitation (empirically set to 4)

  • speeds up phrase-, WITH-, and WITHOUT-queries by up to 69%, e.g. ("@das @Haus")
  • can hurt up to 5% for "very simple" &&-queries, e.g. ( && )
    • introduced in v2.1.19-pre1

Referenced by CQTokenOccurrenceIterator::seek().

Function Documentation

◆ GetWordForms()

void GetWordForms ( const MorphLanguageEnum  Langua,
const string &  src,
set< string > &  WordForms 
)

compute the set of types WordForms which may share a lemma with src in language Langua.

The underlying CLemmatizer should handle transcoding of user queries transparently, assuming you called CLemmatizer::initIconv() with the appropriate encoding arguments.

This is very ugly, and the entire morphology system needs an overhaul.

Formerly a hidden function in QueryNode.cpp.

References CLemmatizer::CreateParadigmCollection(), errProcessMorphology, Format(), CFormInfo::GetCount(), GetLemmatizerByLanguage(), CFormInfo::GetWordForm(), is_upper_alpha(), morphUnknown, CLemmatizer::recode_ext2int(), CLemmatizer::recode_int2ext(), ReverseChar(), and RmlMakeLower().

Referenced by CQTokenOccurrenceIterator::operator==().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ MaxDistanceForNear

const size_t MaxDistanceForNear