NGRAM_OLD

NGRAM_OLD

Syntax

NGRAM_OLD(<string>; <string regular expression for separator>; <number for length>; <number for length>; <number for length>;....)

Description

Returns sub sequences of N words of a given text. To see subsequences of N characters of a given text, refer to NGRAM. Datameer X tries to match entire record without automatically adding ^ or $ to the regular expression. But if the record has multiple lines, then this must be accounted for with (?s) or line terminators.

Examples

Data (string)

Datameer X is the best thing since sliced bread

Example 1

NGRAM_OLD(#RawData!StringColumn;" ";3)

NGRAM_OLD() returns

Datameer

Datameer X is

Datameer X is the

is the best

the best thing

best thing since

thing since sliced

since sliced bread

sliced bread

bread

Example 2

NGRAM_OLD(#RawData!StringColumn;" ";1;2;3)

NGRAM_OLD() returns

Datameer

is

the

best

thing

since

sliced

bread

Datameer X is

is the

the best

best thing

thing since

since sliced

sliced bread

Datameer X is the

is the best

the best thing

best thing since

thing since sliced

since sliced bread