Interface IRangeGenerator
Generates a sequence of Ranges.
Namespace: Unity.InferenceEngine.Tokenization.Truncators
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public interface IRangeGenerator
Methods
GetRanges(int, int, int, Output<Range>)
Generates a sequence of chunks based on the length of the source,
the maximum size of those chunks, and a stride.
Declaration
int GetRanges(int length, int rangeMaxLength, int stride, Output<Range> output)
Parameters
| Type | Name | Description |
|---|---|---|
| int | length | The length of the source. |
| int | rangeMaxLength | The maximum size of the resulting chunks. |
| int | stride | The stride controls how the generator goes along the |
| Output<Range> | output | The sequence of chunks, each represented by a Range. |
Returns
| Type | Description |
|---|---|
| int | The number of ranges generated. |