
Token
- Namespace
- Rowles.LeanCorpus.Analysis
- Assembly
- Rowles.LeanCorpus.dll
Represents a single token produced by the analysis pipeline, carrying the term text, offsets, token-type metadata, and positional metadata.
public readonly struct Token
Token(string, int, int, string, int, byte[]?, int)
Initialises a new Token with an extensible token type.
DefaultType
The default token type used for ordinary term tokens.
EndOffset
Gets the exclusive end character offset of the token in the original input.
Payload
Gets the optional payload bytes associated with this token position.
PositionIncrement
Gets the position increment for this token relative to the previous emitted token.
PositionLength
Gets the number of positions spanned by this token edge. The default value of one represents an ordinary linear token.
StartOffset
Gets the start character offset of the token in the original input.
Text
Gets the normalised term text of the token.
Type
Gets the token type.