Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureModelDownloaded ¶
EnsureModelDownloaded pulls the model files into the local cache if missing. We only need the tokenizers for sparse vector generation.
func GenerateSparseVector ¶
GenerateSparseVector builds a normalized BOW sparse vector from text. Special tokens (PAD, CLS, SEP) are filtered to reduce noise.
Returns error if:
- Text cannot be tokenized
- No valid tokens remain after filtering
- Normalization fails (due to zero norm)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.