[][src]Module ed_join::qgram

Structs

PosQGram

A poistional q-gram is a token-location pair for a given string.

PosQGramArray

A collection of token-position pair, as an alternative representation of a string.

Functions

generate_inverted_index

This function reads an entire file into a string, count q-grams by parallel iterators, and returns a hashmap where the keys are q-gram tokens, and values are a vector of line-position pair.

Type Definitions

ID

Corresponds to a line number where a token appears.

InvertedIndex

An indexmap of inverted lists for each token. The keys are Token, while the values are a tuple of InvertedList and usize.

InvertedList

An InvertedList is a vector of ID-location pair, where ID is the line number where a certain token appears, and location is the index of that line where the token appear.

Loc

Corresponds to a position in a string where a token appears.

Token

A symbol, such as a q-gram