Class LeftDirectionRangeGenerator
Generates a sequence of Range starting from the left (0, the lower
bound of the source).
Implements
Inherited Members
Namespace: Unity.InferenceEngine.Tokenization.Truncators
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public class LeftDirectionRangeGenerator : RangeGeneratorBase, IRangeGenerator
Methods
GetRangesInternal(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
protected override int GetRangesInternal(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. |