#include <compare.hh>
Public Member Functions | |
SuffixOrder (std::size_t order) | |
bool | Compare (const WordIndex *lhs, const WordIndex *rhs) const |
Static Public Attributes | |
static const unsigned | kMatchOffset = 1 |
This comparator compares n-grams lexicographically, one word at a time, beginning with the last word of each n-gram and ending with the first word of each n-gram.
Some examples of n-gram comparisons as defined by this comparator:
Definition at line 59 of file compare.hh.
lm::SuffixOrder::SuffixOrder | ( | std::size_t | order | ) | [inline, explicit] |
Constructs a comparator capable of comparing two n-grams.
order | Number of words in each n-gram |
Definition at line 67 of file compare.hh.
Compares two n-grams lexicographically, one word at a time, beginning with the last word of each n-gram and ending with the first word of each n-gram.
lhs | A pointer to the n-gram on the left-hand side of the comparison | |
rhs | A pointer to the n-gram on the right-hand side of the comparison |
Definition at line 76 of file compare.hh.
References lm::Comparator< SuffixOrder >::order_.
const unsigned lm::SuffixOrder::kMatchOffset = 1 [static] |
Definition at line 84 of file compare.hh.