Essence.Ngrams (essence v0.3.0)
This module offers various utility functions for generating bi-grams, tri-grams, and n-grams for given textual elements.
Link to this section Summary
Functions
Calculate a list of two consecutive token pairs (bi-grams) from the
given token_list
or Essence.Document
.
Calculate a list of n consecutive token sequences (n-grams) from
the given token_list
or Essence.Docuemnt
.
Calculate a list of three consecutive token triples (tri-grams) from
the given token_list
or Essence.Docuemnt
.
Link to this section Functions
bigrams(token_list)
Calculate a list of two consecutive token pairs (bi-grams) from the
given token_list
or Essence.Document
.
ngrams(token_list, n)
Calculate a list of n consecutive token sequences (n-grams) from
the given token_list
or Essence.Docuemnt
.
trigrams(token_list)
Calculate a list of three consecutive token triples (tri-grams) from
the given token_list
or Essence.Docuemnt
.