Reference material for NGRAM function
n
and a text sequence, then splits the sequence into
overlapping contiguous subsequences of length n
.
Parameter | Description | Datatype |
---|---|---|
<n> | An integer specifying the length of each n-gram. | INTEGER |
<text> | The text sequence to split into n-grams. | TEXT |
ARRAY(TEXT)
ARRAY(TEXT) NULL
.n
.
n
is smaller than the size of the input text, an array containing the single value of the input text is returned.n
is smaller than 1, an error is thrown.NULL
, the result is NULL
regardless of the other input value.n
is smaller than 1.
NULL
, the result is NULL
.
result (ARRAY(TEXT)) |
---|
{he,el,ll,lo,"o "," w",wo,or,rl,ld} |
result (ARRAY(TEXT)) |
---|
{hel,ell,llo,"lo ","o w"," wo",wor,orl,rld} |
result (ARRAY(TEXT)) |
---|
{h,e,l,l,o} |
result (ARRAY(TEXT)) |
---|
{hi} |
result (ARRAY(TEXT)) |
---|
{こん,んに,にち,ちは} |
result (ARRAY(TEXT)) |
---|
{😊👍,👍🎉} |