nxt.ngram

First and Higher Order Statistics: $(LUCKY Histograms) and $(LUCKY N-grams).

Members

Enums

Kind
enum Kind

N-Gram Model Kind.

Storage
enum Storage

N-Gram Model Storage.

Symmetry
enum Symmetry

N-Gram Model Symmetry.

Functions

bigram
auto bigram(Range range)

Computes $(LUCKY Bi-Gram) of range.

bistogram
auto bistogram(Range range)

Computes $(LUCKY Binary Histogram) of range.

bistogramOverRepresentation
auto bistogramOverRepresentation(string x)

Computes $(LUCKY Binary (Occurrence) NGram) of Bytes in Input String x.

ngram
auto ngram(Range range)

Computes $(LUCKY Bi-Gram) of range.

pengram
auto pengram(Range range)

Computes $(LUCKY Pen-Gram) of range.

quagram
auto quagram(Range range)

Computes $(LUCKY Qua-Gram) of range.

trigram
auto trigram(Range range)

Computes $(LUCKY Tri-Gram) of range.

Structs

NGram
struct NGram(ValueType, int N = 1, Kind kind = Kind.saturated, Storage storage = Storage.denseDynamic, Symmetry symmetry = Symmetry.ordered, RequestedBinType = void, Range)

Computes $(LUCKY N-Gram) Model of Input Range range.

Meta

Authors

TODO Replace static ifs with static final switch when Issue 6921 is fixed

TODO Remove overloads using std.string:representation and use sparse maps over dchar for strings.