clang-tools 8.0.0

Namespaces | Functions
Trigram.h File Reference

Trigrams are attributes of the symbol unqualified name used to effectively extract symbols which can be fuzzy-matched given user query from the inverted index. More...

`#include "Token.h"`
`#include <string>`
Include dependency graph for Trigram.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
| clang
| ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
| clang::clangd
| clang::clangd::dex

## Functions
std::vector< Token > | clang::clangd::dex::generateIdentifierTrigrams (llvm::StringRef Identifier)
| Returns list of unique fuzzy-search trigrams from unqualified symbol. More...
std::vector< Token > | clang::clangd::dex::generateQueryTrigrams (llvm::StringRef Query)
| Returns list of unique fuzzy-search trigrams given a query. More...

## Detailed Description

Trigrams are attributes of the symbol unqualified name used to effectively extract symbols which can be fuzzy-matched given user query from the inverted index.

To match query with the extracted set of trigrams Q, the set of generated trigrams T for identifier (unqualified symbol name) should contain all items of Q, i.e. Q ⊆ T.

Trigram sets extracted from unqualified name and from query are different: the set of query trigrams only contains consecutive sequences of three characters (which is only a subset of all trigrams generated for an identifier).

Definition in file Trigram.h.