Supported in: Batch, Streaming
Extract a series of text segments using sliding window segmentation.
Expression categories: String
Output type: Array<String>
Description: This test shows the abilty of the tranform to properly segment asmall set of text where the end will be its own segment as well. Argument values:
string
string | Output |
---|---|
hello world this is a test string | [ hello world this, this is a, a test string, string ] |
Description: Test with negative overflow. Argument values:
string
length
overflow
string | length | overflow | Output |
---|---|---|---|
She sells sea shells by | 2 | -1 | [ She sells, shells by ] |
Description: A larger test with overflow and a smaller segment at the end. Argument values:
string
length
overflow
string | length | overflow | Output |
---|---|---|---|
hello world this is a larger test with overlap, the nature of the human spirit is strange as such i ... | 10 | 3 | [ hello world this is a larger test with overlap, the, with overlap, the nature of the human spirit ... |
Description: Test a string where overflow is set to 0and the last segment is smaller than a full length. Argument values:
string
string | Output |
---|---|
hello world this is a test string | [ hello world this, is a test, string ] |
Description: Test with no overflow where the segments are perfectly divided by length. Argument values:
string
length
overflow
string | length | overflow | Output |
---|---|---|---|
hello world this is a test string without overlap | 3 | 0 | [ hello world this, is a test, string without overlap ] |
Description: Test with no overflow where the segments are perfectly divided by length. Argument values:
string
length
overflow
string | length | overflow | Output |
---|---|---|---|
null | null | null | null |
Description: Test with no overflow where the segments are perfectly divided by length. Argument values:
string
length
overflow
string | length | overflow | Output |
---|---|---|---|
null | 1 | null | null |
Description: Test with no overflow where the segments are perfectly divided by length. Argument values:
string
length
overflow
string | length | overflow | Output |
---|---|---|---|
Hello world | null | null | null |