Constructor for TokenManager.
The label manager associated with the TokenManager.
An array of TokenizerSpans objects to initialize the tokens.
The current paragraph
A counter for the number of edits made to the tokens.
The label manager associated with the TokenManager.
An array of tokens or token blocks managed by the TokenManager.
Adds a block from an Entity or TMTokenBlock structure.
The Entity or TMTokenBlock structure to add.
Adds a new block of tokens to the TokenManager.
The start index of the new block.
The end index of the new block.
The label class for the new block, can be undefined.
The current state of the new block.
Optional
history: History[] = []An optional array of history entries for the new block.
Gets all blocks in the specified range.
The start index of the range.
The end index of the range.
Gets a block by its start index.
The start index of the block to retrieve.
Checks if there are any overlapping blocks in the specified range.
The start index of the range.
The end index of the range.
Removes a block of tokens by its start index.
The start index of the block to remove.
Optional
reintroduceTokens: boolean = trueWhether to reintroduce the tokens from the removed block back into the tokens array.
Class representing the TokenManager.
Description
This class manages tokens and token blocks, allowing for operations such as adding, removing, and updating blocks.