get_ngrams_ind {biogram} | R Documentation |
Get indices of n-grams
Description
Computes list of n-gram elements positions in sequence.
Usage
get_ngrams_ind(len_seq, n, d)
Arguments
len_seq |
|
n |
|
d |
|
Details
A format of d
vector is discussed in Details of
count_ngrams
.
Value
A list with number of elements equal to n
. Every element is a
vector containing locations of given n-gram letter. For example, first element of
list contain indices of first letter of all n-grams. The attribute d
of output contains distances between letter used to compute locations
(see Details).
Examples
# positions trigrams in sequence of length 10
get_ngrams_ind(10, 9, 0)
[Package biogram version 1.6.3 Index]